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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to