[Zope3-Users] Re: Events
David Johnson
djohnson at jsatech.com
Thu Feb 22 08:57:49 EST 2007
>> This is probably the approach I will follow, but what if I want my
>> container objects notified?
>
> I thought you don't... ?
This is both a theory and practice question. I want to make sure I
follow practices that will not lead me into trouble in the future.
In this case I am likely to want an ObjectModifiedEvent so that my
objects can be saved if they are modified. For example if I edit an
object via browser:editform, an ObjectModifiedEvent will be sent. I
am not clear whether Zope will examine every object in my container
to see if it has an event handler for ObjectModifiedEvent; which is
what it seems to do now.
>
>> Even if I don't it seems the default Folder implementation follows
>> this logic and so if you have a folder with several large images
>> for example, then you will pay a price whenever an event is
>> issued. In general it seems that any change will result in the
>> entire ZODB being read for each event dispatch...if I still follow
>> the logic here.
>
> That's not what I said. It will only happen on object moves, in
> particular, when a container is moved. It will also only happen for
> the subitems of that container, not "the whole ZODB", though
> arguably that can mean a lot of data.
>
> I would personally like to see some form of disabling event handlers.
Thank you for the clarification.
--
David
More information about the Zope3-users
mailing list