Re: Catching edits to items in a table view using bindings
Re: Catching edits to items in a table view using bindings
- Subject: Re: Catching edits to items in a table view using bindings
- From: "Matthew M. Swann" <email@hidden>
- Date: Fri, 3 Jun 2005 21:44:13 -0700
mmalc, thanks for the speedy reply! Makes perfect sense -- I registered for my array controller's "arrangedObjects.title" key and that's sending me notifications when I change a title.
Two follow-up questions:
-- I passed NSKeyValueObservingOptionNew to the addObserver: method's options: parameter, as I'm interested in the new value that's set. However, the change dictionary always contains null. Am I missing something?
-- I get a notification when the app first starts up, when the tableview populates itself. Is there an easy way to distinguish between this notification and user-generated ones? The change dictionary appears identical in both cases (but see the previous issue).
Thanks, Matt
On Jun 3, 2005, at 9:12 PM, Matthew M. Swann wrote:
I have a table view that is bound to an array controller that is itself bound to a core data store. Certain table columns are editable in my view, and I'd like to be notified when these values change.
You must register as an observer of the relevant properties of the objects in the array.
(See GraphicsView in "Graphics Bindings" at <http://homepage.mac.com/ mmalc/CocoaExamples/controllers.html> for a non-Core Data example. The principles are the same.)
mmalc
|
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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