[Zope] __setstate__ and acquistion

Gabriel Genellina gagenellina at softlab.com.ar
Thu Nov 27 14:58:46 EST 2003


At 27/11/2003 12:42, you wrote:

>Okay, I was trying to use acquisition from within a
>__setstate__ method.  Doing a little searching I was
>able to find a message from the Zope list (circa 2001)
>saying that you can't do it, because the self that
>__setstate__ acts on isn't acquisiton wrapped.
>
>However this is really unfortunate, as I was hoping
>to acquire some information I need for updated the
>object from the Zope instance of the top-level site
>object.
>
>Is there a way to do it?  Can I explicitly search somehow?
>
>Or can I mark the object as needing to be updated and
>catch it at some other point? (But where!?
>__bobo_traverse__ perhaps?).

Maybe you could wrap some property in a ComputedAttribute and, when called, 
detect the need for update and do it. Only if you can find ust one (or a 
few) properties that must fire the update.


Gabriel Genellina
Softlab SRL




More information about the Zope mailing list