Refreshing NSArrayController after Undo/Redo
Refreshing NSArrayController after Undo/Redo
- Subject: Refreshing NSArrayController after Undo/Redo
- From: Joanna Carter <email@hidden>
- Date: Mon, 22 Mar 2010 13:11:31 +0000
Hi folks
I understand how to manage the NSUndoManager on a NSManagedObjectContext, but getting the visuals to react is proving elusive.
Example
=======
Core Data application (not document-based)
Main form contains an NSTableView connected to an NSArrayController in Entity mode.
I can add and remove objects and the NSTableView is correctly updated when Undo and Redo are called on the MOC.
An Edit... button opens editing form.
Editing Form Controller hold a reference to the original MOC and creates secondary MOC. The controller handles NSManagedObjectContextDidSaveNotification to merge changes on the original context.
Changes are being saved back to the original MOC and the NSTableView is being updated correctly when the editing form closes.
The only thing that I can't get to work is to update the NSTableView when I call Undo after the saved edit.
Joanna
--
Joanna Carter
Carter Consulting
_______________________________________________
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