[TransWarp] component path - property name dualism, does this make sense?

Phillip J. Eby pje at telecommunity.com
Tue Aug 19 16:42:51 EDT 2003


At 07:30 PM 8/19/03 +0200, Matthias Drochner wrote:

>pje at telecommunity.com said:
> >          if self.__objectsToBeAssembled__ is None:
>
>Hmm - if I do so literally, I get the "AttributeError" exception
>when I access a property first time.
>Noticing that __objectsToBeAssembled__ is an empty list at this
>point, I changed the code to
>"if not self.__objectsToBeAssembled__:", but now I get the "/"
>component path again...

Okay, one more try...  make the 'propertyMap' binding be 
'activateUponAssembly=True', and have the __getattr__ check 'if 
self._hasBinding('propertyMap'):' instead of checking 
__objectsToBeAssembled__.  My intent is that __getattr__ should fail unless 
the component knows its parent.

By the way, you don't have any components that are overriding __init__ or 
that might be trying to get access to these attributes before they 
themselves know their parent, do you?

If the above doesn't work, perhaps you could send me code that produces the 
problem, and I'll see what I can figure out.




More information about the PEAK mailing list