[Zope3-Users] Re: ObjectModifiedEvent but not ContainerModifiedEvent

Chris Withers chris at simplistix.co.uk
Mon Aug 20 05:51:13 EDT 2007


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/subscribers works 
seems to be sub-optimal, especially for my use case, which I suspect may 
be a common one: the set of operations you want to do when a container's 
properties change doesn't have much intersection with those you want to 
do when the contents of a container changes.

> Better way? The only better way, really, would be doing a re-dispatch. 
> Or fire off your own event when you modify other properties on a container.

Indeed. I think a better long term solution would be to have 
ContainerModified be seperate from ObjectModified, no?

> Or kick all of the code that sends modified events so that they send 
> along descriptions of what has changed. 

You're still filtering then, and I don't think we want ot be filtering 
in that way here...

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope3-users mailing list