[Zope] Re: How do I update objects?

Cornel Nitu c.nitu@finsiel.ro
Mon, 17 Feb 2003 15:21:19 +0200


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

It should work..

At 02:16 PM 2/17/2003 +0100, you wrote:
>Cornel Nitu wrote:
>
>>
>>Hi,
>>Is it possible to be... newProperty = self.aq_parent.title ?
>>
>Nope.
>aq.parent is for some reason not known at this stage..
>
>\Oliver
>