[Zope-dev] changing aquired attributes

Matt matt@virtualspectator.com
Wed, 8 Aug 2001 00:25:58 +1200


Hopefully a simple answer to this.  I am using an external method to change
aquired properties, eg, to increment an integer property acquired from
somewhere.  The problem is to persist this.  It is easy enough to find the
aquired property, eg: self.aquired_property, and then of course to change
it.  But to make this persist, the only way I found of doing this was to
write a recursive function that went through each aquisition wrapper asking
if this unwrapped level had the property.  If it did I would set
self._p_changed=1 on the object that owned it and all would be fine, the
update to the property would persist.  Is there any more elegane method for
updating an aquired property like this that also forces it to persist?

regards
Matt