Andreas Kostyrka <[EMAIL PROTECTED]> wrote: > Am Mon, 2002-09-23 um 11.12 schrieb Florent Guillaume: > > Anoter way to do that is to play games with __of__. > > Look at the implementation of the skins tool in CMF for an example. > Doesn't help, as I do NOT know my container :(
Yes it does. __of__ is non-intuitive but it can work. > Basically __getattr__ when called does not know it's containment > anymore. :( You didn't look a the code I pointed to you. Look at CMFCore/Skinnable to be precise (not everything is to be used of course). * In __of__ you store the parent in a volatile attribute, * in __getattr__ you lookup the volatile attribute This works as long as your object is not used in several different acquisition contexts. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:[EMAIL PROTECTED] _______________________________________________ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )