[Grok-dev] Grokking Order

Santiago Videla santiago.videla at gmail.com
Wed Dec 31 15:54:37 EST 2008


Hi there,

I`m not sure, but maybe you could take a look at the GlobalUtility grokker
(1) to see the priority and set a lower priority in your custom grokker

(1)
http://svn.zope.org/grokcore.component/trunk/src/grokcore/component/meta.py

Best regards

On Wed, Dec 31, 2008 at 12:26 PM, Paul Wilson <paulalexwilson at gmail.com>wrote:

> Happy New Year!
>
> I've got a non-persistent container (i.e. doesn't subclass
> grok.Container) that I'm registering as a GlobalUtility. It's purpose
> is to contain references to classes (implemented as multi-adapters)
> that are plugged into the application via grokking. It will be used to
> acquire a tree-like representation of plugged in classes (hence the
> containment) within my web application. So I have a custom grokker set
> up for pluggin class registration, and a directive to state where in
> this hierarchy the class should be placed. However, when these
> extensions classes are grokked, and I try to find my global container,
> it seems that my GlobalUtility is not present: component.getUtility()
> raises a ComponentLookupError for the interface. My conclusion is that
> the grok.GlobalUtility grokker hasn't run yet.
>
> How can I get a grok.GlobalUtility to be registered prior to my custom
> defined grokkers? Or is my solution to my problem incorrect?
>
> Thanks,
> Paul
>
> p.s. I have my customer grokker's priority set to -1 too, but this doesn't
> help
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev
>



-- 
Santiago Videla
www.revolucionesweb.com.ar
http://www.linkedin.com/in/svidela

Sigue la mata dando de que hablar siempre abajo y a la izquierda donde el
pensamiento que se hace corazón resplandece con la palabra sencilla y
humilde que l at s tod at s somos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/grok-dev/attachments/20081231/50564102/attachment.html 


More information about the Grok-dev mailing list