Re: core data, undo and redo - follow-up question
Re: core data, undo and redo - follow-up question
- Subject: Re: core data, undo and redo - follow-up question
- From: Kyle Sluder <email@hidden>
- Date: Sat, 22 May 2010 10:25:01 -0700
On Sat, May 22, 2010 at 10:20 AM, Martin Hewitson
<email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden