Am Mon, 2002-09-23 um 18.29 schrieb Florent Guillaume:
> 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.
So how do I call it?
return myitem.__of__(self)
Doesn't make sense, as self is not wrapped and as such DOES not contain
any knowledge how it was accessed, ...
might be quite different things?

My problem especially is not generating a wrapper, but to acquire some
object from up my acquisition chain, ...

> > 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.
But exactly THIS I want to support. How should I know if the object will
not be used sometime in the future with different contexts. How can I
know that my content objects will not be recycled in a second Virtual
Host? etc.


Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to