addObserver:forKeyPath:options:context
addObserver:forKeyPath:options:context
- Subject: addObserver:forKeyPath:options:context
- From: Eric Long <email@hidden>
- Date: Mon, 17 Apr 2006 11:02:54 -0700
Hi,
I have a master/detail interface that is working well overall with bindings.
I have an array of objects the user can edit individually. I want to know
when the user has changed an object's value so I can enable my "Save
Changes" button.
I don't understand how to use the addObserver:forKeyPath:options:context to
allow my UI controller to observe when a property of any object in my
objects array has changed. There's no key path I can watch for the array,
since array items are referenced by index. It seems kind of ridiculous to
iterate the array and register individually for each object. I'm thinking
there must be a better way to do this.
I haven't been able to find sample code that shows a master/detail
implementation that detects changes to the data that must be saved.
What's the right way to do this?
Thanks,
Eric
_______________________________________________
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