[Grok-dev] Call for feedbacks : megrok.Resource

Jeroen Michiel jmichiel at yahoo.com
Thu Feb 18 05:45:35 EST 2010


I have been using hurry.yui an hurry.zoperesource until now.
I'm switching hurry.zoperesource for megrok.resource and it still works.

However, I'm now trying to use the include directive instead of the need()
approach, but I can't seem to get it working.

Am I correct that the need() approach can only be used inside methods
(typically update()), but the include directive is meant to be used on class
level?
So I should be able to replace my previous code:

class Layout(layout.Layout):
    grok.name('layout')
    grok.context(Interface)
    
    def update(self):
        hurry.yui.reset_fonts_grids.need()
        hurry.yui.base.need()

with

class Layout(layout.Layout):
    grok.name('layout')
    grok.context(Interface)
    resource.include(hurry.yui.reset_fonts_grids)
    resource.include(hurry.yui.base)


Or am I completely off-track, here?

Thx!

Souheil CHELFOUH wrote:
> 
> Hello friends,
> 
> I wondered if any of you (except Christian Klinger, because I already
> know), use the lib megrok.resource, which is a grok layer above
> hurry.resource ?
> Feedbacks would be more than welcome on that strategical library. I
> have already an extension for it, but I need opinions and suggestions,
> first.
> If you could take 5 min to write a note, I'll greatly appreciate it.
> 
> - Souheil
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> https://mail.zope.org/mailman/listinfo/grok-dev
> 
> 

-- 
View this message in context: http://old.nabble.com/Call-for-feedbacks-%3A-megrok.Resource-tp27625149p27637035.html
Sent from the Grok mailing list archive at Nabble.com.



More information about the Grok-dev mailing list