[Zope3-dev] ObjectHub/Event service: who sends those events anyway?

Chris Withers chrisw@nipltd.com
Thu, 17 Oct 2002 10:21:10 +0100


Gary Poster wrote:
> class IVocalContainer(ICopyPasteContainer):

Why introduce complexity? What's the use case for a NoneVocalContainer?
(I'd see them as a PITA to deal with :-S)


>     def setObject(key, object):
>         """sets object and sends an IObjectAdded event"""
>     
>     def silentSetObject(key, object):
>         """does not send an event; used by moveTo and duplicateTo"""

YAGNI.

>     def __delitem__(key):
>         """deletes object and sends an IObjectRemoved event"""
>     
>     def silentDel(key):
>         """does not send an event; used by moveTo"""

YAGNI

> Notice that's a new event type--IObjectDuplicated.  Presumably it would
> need a hub event parallel as well.

Why? What's wrong with an added?

> Then the folder handles all of the events for the contained objects
> except for IModified.  I think one possible ObjectHub subscriber might
> reject any moves that tried to move a registered object into a
> non-IVocalContainer, for instance.

YAGNI

cheers,

Chris