On Sat, May 22, 2010 at 10:20 AM, Martin Hewitson
<martin.hewit...@aei.mpg.de> wrote:
> Actually, I remembered what the other problem was that 'lead me down the 
> wrong path'. I'm observing one of the properties of the NSManagedObject, so 
> before I remove it from the tree-controller, I stop observing the property. 
> Now if I undo the removal, I need a place to set up the observing again.
>
> Can anybody recommend where I should do that? I notice that 
> insertObject:atArrangedObjectIndexPath: of NSTreeController is not called 
> when I undo the removal.

In the undo action itself? Barring that, other options depend on who's
doing the observing. If it's controller-level code, you should
theoretically be able to set up all your observing as objects are
added to and removed from the controller's set of objects it controls.
If it's model-level code, that answer depends on specifics of your
model.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to