substanced icon indicating copy to clipboard operation
substanced copied to clipboard

ObjectRemoved event may not be fired

Open mcdonc opened this issue 11 years ago • 3 comments

If someone subscribes to an object removed event with a particular context but the object is removed indirectly (by perhaps deleting a folder in which it lives), the event will not be fired.

mcdonc avatar Aug 31 '13 06:08 mcdonc

The cost of firing all those events is too high to make everyone pay. Applications which need this behavior should register a "re-broadcasting" subscriber, which converts the original event to a set of events, one each for the transitive closure of its items.

tseaver avatar Aug 31 '13 13:08 tseaver

Agreed. It just needs to be documented well I think.

mcdonc avatar Sep 01 '13 17:09 mcdonc

This is basically a documentation task that should explain that to catch all remove events, you'll have to register a subscriber for ObjectWillBeRemoved without any context (so it will be fired whenver any object is deleted) and resolve all oids in event.removed_oids.

mcdonc avatar Sep 03 '13 07:09 mcdonc