logo       

Re: events gripes: msg#00066

web.zope.z3base.five

Subject: Re: events gripes

whit wrote:
when IObjectMoved events get dispatched to sublocations upon a container rename, are event.newName and event.oldName suppose to be the new and old name of the container(which, to me, seems meaningless to subscriber),

No.

or the old and new name of the object that is the focus of the event (as it is if you move an object)?

Yes. Assuming you mean the correct thing for "the focus of the event".

I get the old and new name for the container for *every* object event involved in the container modification.

is there some subtle wonderfulness I'm overlooking here? or is this just broken?

When a event is dispatched to sublocations, it doesn't change, it's still the same event. It's just redispatched.

The doc in Five/doc/event.txt says this:

The ``event`` won't change though, and ``event.object`` will still be the original object for which the event was initially sent (this corresponds to ``self`` and ``item`` in the ``manage_afterAdd`` method -- ``self`` is ``ob``, and ``item`` is ``event.object``).

Florent


--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com fg@xxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise