Re: NSTableView, undo, bindings
Re: NSTableView, undo, bindings
- Subject: Re: NSTableView, undo, bindings
- From: Theodore Petrosky <email@hidden>
- Date: Sun, 7 Nov 2004 05:29:24 -0800 (PST)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
m-,
you should take a look at the example in the second
edition of the hillegass book (page 147). It gives a
clear example of how to do this.
Ted
>
> 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 you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
_______________________________________________
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