[Zope3-dev] Re: emit ObjectModifiedEvent when object changed and zodb noticed?
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 ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Re: emit ObjectModifiedEvent when object changed and zodb noticed?
On Sep 26, 2006, at 1:38 PM, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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? I would say that, in general, "view code" should be emitting the events, rather than content objects. In any case, could we do anything clever to do with event emitting when objects are committed to the zodb? No. Agreed. Jim -- Jim Fulton mailto:[EMAIL PROTECTED]Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporationhttp://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] Re: emit ObjectModifiedEvent when object changed and zodb noticed?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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? I would say that, in general, "view code" should be emitting the events, rather than content objects. > In any case, could we do anything clever to do with event emitting when > objects are committed to the zodb? No. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFGWWJ+gerLs4ltQ4RArOJAKCKyEgScvygoFXO1OSKp+8T4IsFZACglTnW OHC83OO1LK2vtvqDWwYiXG8= =ePmE -END PGP SIGNATURE- ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com