NSUndoManager, NSTableView with bindings
NSUndoManager, NSTableView with bindings
- Subject: NSUndoManager, NSTableView with bindings
- From: Trygve Inda <email@hidden>
- Date: Sun, 16 Feb 2014 08:34:16 -0800
- Thread-topic: NSUndoManager, NSTableView with bindings
I have an NSTableView with several columns bound to an NSArrayController
which manages the array of my custom objects.
Undo of course works while editing a cell in the NSTableView, but once the
edit is complete, I need to manage it myself.
How is the best way to do this?
I need to know the original contents of the cell (property in my object) so
do I need to use controlTextDidBeginEditing, save the value somewhere, then
in controlTextDidEndEditing, if they are different, push the change onto the
undo stack?
Since the table uses bindings, the setting of the property is handed by the
binding system.
Thanks,
Trygve
_______________________________________________
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