[Grok-dev] Grokking Order
paulalexwilson at gmail.com
Wed Dec 31 10:26:05 EST 2008
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?
p.s. I have my customer grokker's priority set to -1 too, but this doesn't help
More information about the Grok-dev