• 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
Re: Changes in KVO behavior on SL?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changes in KVO behavior on SL?


  • Subject: Re: Changes in KVO behavior on SL?
  • From: Derek Chesterfield <email@hidden>
  • Date: Wed, 02 Sep 2009 14:01:00 +0100


On 2 Sep 2009, at 13:47, Kevin Brock wrote:

Likewise, there's never been any guarantee that invoking - observeValueForKeyPath:ofObject:change:context: will provoke the receiver to call -valueForKeyPath: on the object whose property has changed. If the observer wants, it can rely totally on the information in the change dictionary. If you were using will/ didChange..., then KVO can be expected to invoke valueForKey: on the object whose property is changing, but that's not what (you say) you're doing.

Thanks. That was helpful. On 10.5 the receiver *does* apparently always call valueForKeyPath, at least with the receivers we're talking to. Maybe they weren't checking the dictionary on 10.5, or were calling the fn if the data on the new values wasn't found in the dictionary, but are being stricter on 10.6.

Ken didn't contradict the behaviour you have observed. But you are [were] relying on a mechanism that is undocumented and quite possibly accidental on the part of Apple's engineers, and so could have changed at any time, or might have been erratic/fragile even on 10.5.


In other words, it is merely fortunate that your app ever worked on 10.5, and not by design ;-)
The documented pattern that Ken described should work on both 10.5 and 10.6, and will always work... until deprecated anyway!
_______________________________________________


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


References: 
 >Changes in KVO behavior on SL? (From: Kevin Brock <email@hidden>)
 >Re: Changes in KVO behavior on SL? (From: Ken Thomases <email@hidden>)
 >Re: Changes in KVO behavior on SL? (From: Kevin Brock <email@hidden>)

  • Prev by Date: Re: Changes in KVO behavior on SL?
  • Next by Date: Re: contextual menu plugin example in cocoa
  • Previous by thread: Re: Changes in KVO behavior on SL?
  • Next by thread: Have sheet delay until done?
  • Index(es):
    • Date
    • Thread