[Zope] Undo problem

Pascal Peregrina Pperegrina at Lastminute.com
Thu Jan 13 11:00:06 EST 2005


Hi,

I have made 2 Zope products.

One of them is a content object that extends PropertyManager.
The  :
+ _update_property
+ _set_property
+ _del_property
methods have been redefined to add a call to my 2nd product, in order to
notify it about the changes.

--- code excerpt ---
def  _del_property(self,id):
 <call to the PropertyManager method>
 try:
  getToolByName(self,'change_tracker').manage_addChange(<params>)
 except:
  pass
-----

I created an object A of this type.

The 2nd product is a tool with a simple PersistentMapping() that store these
changes information.

--- code excerpt ---
def manage_addChange(self,<params>):
	...
	self._changes[<somekey>]=<somevalue> # self._changes is the
PersistentMapping
	self._changes=self._changes #to be sure PersistentMapping is updated
in ZODB
	...
-----

I created an object B of this type.

When I modify properties on A, I get the information added to B.
So I thought eveything was working fine.

Unfortunately, when I undo a change on A (using undo tab in ZMI),
information is not removed from B.

Can someone tell me what I did wrong ?

Thanks a lot.

Pascal


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



More information about the Zope mailing list