[TransWarp] Component hierarchy traversal
Phillip J. Eby
pje at telecommunity.com
Fri Oct 10 13:13:46 EDT 2003
At 07:03 PM 10/10/03 +0200, Radek Kanovsky wrote:
>Looking at peak.binding.component:Component.__parentComponent method
>it seems that bindings with uponAssembly set are evaluated before binding
>`__parentComponent = Make(__parentComponent, suggestParent=False)' finish.
That doesn't seem right. __parentComponent() sets 'd[a]=parent' before
calling self.uponAssembly(), so it should know its own parent. Hmmm.
>So my registration routines are invoked before instance config.makeRoot()
>is set up as parent of my application and lookupComponent(ICommandRoot)
>fails with exception peak.exceptions.InvalidRoot because my Application
>instance is supposed to be root at that time.
That doesn't seem possible, at least if you are creating your app with:
Application(config.makeRoot(), ...)
Maybe I'm misunderstanding something about how you're doing this.
More information about the PEAK
mailing list