Dominik Huber wrote:



2. A subtype of IObjectModifiedEvent is cluttering because of redundant modification events. The modification is caused by the containment. Regularly the dispatching related to the containment hierarchy tries to emulate an information flow from *parent -> child*, because children should be informed if the location information has been changed. But the other way around you need *never* a notification, because the container is aware of changes related to the container framework! Here an more adequat solution would be an internal container framework event that derives from IObjectEvent but not from IObjectModifiedEvent, because otherwise we would notify the same modification using two redundant modification events.


For your interest, the W3C DOM event model uses a two-way event propagation: from parent to child and from child to parent.

- the parent -> child model (event capturing) corresponds to the original Netscape 4 implementation. It is similar to the one currently implemented in Zope3 for containers (dispatchToSublocations).
- the child -> parent model (event bubbling) is implemented in IE5

the W3C model mixes both approaches.

I would suggest reading the Document Object Model Events recommendation [1] and for some background information some great introduction to events models in browsers [2]. The notion of event cancellation might be useful to consider.

[1] http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
[2] http://www.quirksmode.org/js/events_order.html

/JM
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to