Florent Guillaume wrote:
I dont' know if this affect the events itself but there is also a problem in the ObjectMover.

If you use the ObjectMover from copypastemove on IDependable (registered) objects, it's not possible to move a object because of the order the move process is implemented.

target[new_name] = obj
del container[orig_name]

Doh. I hadn't looked at that code.

if the ObjectAdded Event will add a dependency to the object we can't delete them in the container.

If this should be fixed, I'm not sure if the ObjectMover should copy
dependable objects, then the order should be:

del container[orig_name]
target[new_name] = obj

This means the events order in this usecase looks like:


Where the IObjectMovedEvent notifies about the sucessful move.
Anyway, add a object to a container where is at the same time in
a second container is a bad idea in my point of view.

I think ObjectMover doesn't care about events but it should. It should do whatever is necessary so that only one IObjectMovedEvent is generated. I'll look at that.

Actually the ObjectMover code is correct, it doesn't send the events you say it sends. I added a test for this:


Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to