[Zope3-dev] Re: emit ObjectModifiedEvent when object changed and
zodb noticed?
Philipp von Weitershausen
philipp at weitershausen.de
Tue Sep 26 16:39:19 EDT 2006
Chris Withers wrote:
> Hi All,
>
> Just been wondering about the need to retrofit:
>
> notify(ObjectModifiedEvent(self))
>
> ...into lots of code. Can we do anything less intrusive?
>
> I mean, if a non-Zope object has changed, why should it have to think
> about emitting events?
Objects don't send events about themselves. It's the code that does
things to objects that has the responsibility of sending the right
event. E.g. if your code (e.g. a view) modifies an object, it has to
send the event. Zope's form machineries do this already, btw.
Philipp
More information about the Zope3-dev
mailing list