[Zope] Re: How do I update objects?
Thomas Guettler
Thomas Guettler <thomas@thomas-guettler.de>
Tue, 18 Feb 2003 19:08:39 +0100
On Mon, Feb 17, 2003 at 03:21:19PM +0200, Cornel Nitu wrote:
>
> You can try this piece of code ...
>
> def __setstate__(self, state):
> """update"""
> YourObjectClass.inheritedAttribute('__setstate__')(self, state)
> if not hasattr(self,'newProperty'):
> self.newProperty = self.aq_parent.title
Hi!
I tried this some time ago. This "magical" update did not work for
me. If I recall correctly, the function didn't get called if a object
was in memory.
Now all objects have a refresh method. If I upgrade my source code I
call this method for all objects.
thomas
--
Thomas Guettler <guettli@thomas-guettler.de>
http://www.thomas-guettler.de