• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Question regarding NSArrayController, KVO and Core Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Question regarding NSArrayController, KVO and Core Data
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: CORE DATA: setImage (transient) and setImageData (binary) accessors don't fire.
  • Next by Date: Parsing iTunes XML to NSTableView
  • Previous by thread: RE: CORE DATA: setImage (transient) and setImageData (binary) accessors don't fire.
  • Next by thread: Re: Question regarding NSArrayController, KVO and Core Data
  • Index(es):
    • Date
    • Thread