• 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
[NSObject setValue:forUndefinedKey:] no longer requires explicit KVC notifications?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[NSObject setValue:forUndefinedKey:] no longer requires explicit KVC notifications?


  • Subject: [NSObject setValue:forUndefinedKey:] no longer requires explicit KVC notifications?
  • From: Gabriele de Simone <email@hidden>
  • Date: Fri, 7 Aug 2009 14:50:53 -0400

It used to be that if you overrode -[NSObject setValue:forUndefinedKey:] your own subclass was responsible for calling -[NSObject will/didChangeValueForKey: so that bindings and observers would work as expected.

That was fine, since it allowed one to provide different implementations depending on the key, and to generate (or not) KVC notifications. It seems that a recent update to Mac OS X (perhaps 10.5.8?) has changed this behavior. It seems that as long as you override setValue:forUndefinedKey:, KVC-compliant notifications are automatically generated for the given key.

Can anyone confirm this? This is an "interesting" change to the Cocoa framework that probably interferes with any class that overrides [NSObject setValue:forUndefinedKey:].

Thanks,
Gabe
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: [NSObject setValue:forUndefinedKey:] no longer requires explicit KVC notifications?
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: Core Data completely unable to find the source object model for migration
  • Next by Date: Re: Two right buttons on UINavigationBar?
  • Previous by thread: Re: determinate NSProgressIndicator animation
  • Next by thread: Re: [NSObject setValue:forUndefinedKey:] no longer requires explicit KVC notifications?
  • Index(es):
    • Date
    • Thread