On Tuesday 08 April 2003 4:14 pm, Etienne Labuschagne wrote:
Normally (in my code anyway) I will instantiate the volatiles with the setstate method (in Zope programming anyway).
1. Is setstate Zope specific, or is it called for any ZODB persistent object (i.e. a stand-alone ZODB application)?
it is not zope specific
2. If my object turns into a ghost and after a while I start using it again, will setstate be called again (thus initialising the _v_'s again) or must I check manually that my _v_'s are still there, and do something if not?
It will be called.
3. Is there a way to force the refresh of an in-memory object so that setstate is called again (obviously, I can probably just call setstate manually by myself? But again - that needs a state parameter. . .)
my_object._p_deactivate() will turn my_object into a ghost. setstate will be called on the next attribute access -- Toby Dickenson http://www.geminidataloggers.com/people/tdickenson