On Wednesday 08 March 2006 15:18, Egon Frerich wrote: > I want to have doctests which document the correctness of an handler for > an IObjectModifiedEvent. But the 'notify' triggers a TypeError, because > the handler 'takes exactly 2 arguments (1 given)'. Two arguments are > correct.
I have a suspicion. Here is how to system works: event = AnyObjectEvent(obj) -> zope.event.notify(event) -> zope.app.objectevent.objectEventNotify(event) -> subscribers((event.object, event), None) -> yourHandler(obj, event) Any IObjectEvent gets handled by objectEventNotify, which in turn sends out another subscription request for (obj, event). And you probably have a subscriber for the latter. The easy way to test this would be to manually write: >>> yourHandler(event.object, event) Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training _______________________________________________ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com