Question regarding NSArrayController, KVO and Core Data
Question regarding NSArrayController, KVO and Core Data
- Subject: Question regarding NSArrayController, KVO and Core Data
- From: Todd Cash <email@hidden>
- Date: Sun, 15 Jan 2006 10:53:02 -0800
Hi,
I have an NSArrayController whose underlying entity has an attribute
called 'date'. I've used bindings to bind the controllers
selection.date to a NSDatePicker in my UI. Now, whenever the user
changes the date value I want to be notified of the change so I can
do some processing (change other attributes based upon the date they
entered).
In my AppDelegate I've tried both of these code snippets but my
implementation of observerValueForKeyPath:ofObject:change:context: is
never getting called -
[logsController addObserver:self forKeyPath@"selection.date"
options:NSKeyValueObservingOptionNew context:NULL];
and
[logsController addObserver:self forKeyPath@"date"
options:NSKeyValueObservingOptionNew context:NULL];
How do I go about registering with the NSArrayController for change
notifications?
Thanks,
Todd
_______________________________________________
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