Re: [Zope3-Users] Re: ObjectModifiedEvent but not ContainerModifiedEvent

2007-08-20 Thread Chris Withers
Jeff Shell wrote: Well, a container is an object. It's being modified by the sake of its content changing. Yeah, but the reason there's two types of events would probably be so you can differentiate between them with subscribers. The inheritence structure and nature of how adapters/subscr

Re: [Zope3-Users] Re: ObjectModifiedEvent but not ContainerModifiedEvent

2007-08-17 Thread Jeff Shell
On Aug 17, 2007, at 5:29 PM, Chris Withers <[EMAIL PROTECTED]> wrote: Martin Aspeli wrote: def handler(event): if IContainerModifiedEvent.providedBy(event): return ...which is pretty inefficient. All the subscriber lookup, etc, has to happen to get this far. There must be a

Re: [Zope3-Users] Re: ObjectModifiedEvent but not ContainerModifiedEvent

2007-08-17 Thread Chris Withers
Martin Aspeli wrote: def handler(event): if IContainerModifiedEvent.providedBy(event): return ...which is pretty inefficient. All the subscriber lookup, etc, has to happen to get this far. There must be a better way... Chris -- Simplistix - Content Management, Zope & Python Co

[Zope3-Users] Re: ObjectModifiedEvent but not ContainerModifiedEvent

2007-08-17 Thread Martin Aspeli
Chris Withers wrote: Hey All, How do I subscribe a susbcriber to ObjectModifiedEvent but not ContainerModifiedEvent? I have a subscriber that is currently subscribed to IObjectModifiedEvent, but as a result it's getting called when objects are added and removed whereas I only want it when t