NSTableView, undo, bindings
NSTableView, undo, bindings
- Subject: NSTableView, undo, bindings
- From: m <email@hidden>
- Date: Sat, 6 Nov 2004 14:22:21 -0800
I have a table view bound to an array controller. The model is an array
of dictionaries. The values in the dictionaries can be edited by double
clicking in a table cell and changing the text. That all works very
nicely.
I'm trying to figure out the most straightforward way to implement
undo. I tried overriding the array controller's
observeValueForKeyPath:ofObject:change:context: method, and it does get
called when the user changes a data value in the table, but the change
dictionary argument is always nil, so I don't know what the "before"
value of the data was.
Whether a change dictionary is passed to the array controller's
observeValueForKeyPath:ofObject:change:context: method depends on the
options passed to the dictionary's
addObserver:forKeyPath:options:context: method when the controller
registered as an observer. Is there some way to change the observer
options after the observer relationship is established? Or am I going
about this in completely the wrong way?
_murat
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden