IObjectModifiedEvent: can you know the previous values?
Maurits van Rees
m.van.rees at zestsoftware.nl
Wed Apr 4 12:46:15 UTC 2007
Martin Aspeli, on 2007-04-04:
> This is basically because of the premature object creation in CMF/AT,
> portal_factory, and the title-to-id renaming scheme. Note that for
> Archetypes, you may find it useful to listen to IObjectInitializedEvent
> (first proper save) and IObjectEditedEvent (subsequent edits). Both derive
> from IObjectModified, but should be fired only once. In fact, if you listen
> for IObjectModifiedEvent, you're probably getting those as well. :)
I will keep that in mind.
Or rather, I will put some comments into my configure.zcml so I do not
forget it. :)
IObjectMovedEvent might still be handier in my case, as then my
handler also gets called when an object is moved or removed, which I
need. I could subscribe to those events separately of course.
Ah well, some more test coverage should help me to figure out the best
way.
--
Maurits van Rees | http://maurits.vanrees.org/ [NL]
Work | http://zestsoftware.nl/
"Do not worry about your difficulties in computers,
I can assure you mine are still greater."
More information about the Product-Developers
mailing list