I am very confused here. KVO has nothing to do with a call like
valueForKeyPath:, other than the obvious fact that they are both built
on the idea of key paths. The
observeValueForKeyPath:ofObject:change:context: method doesn't
interact with valueForKeyPath: in any way, and so I don't really
understand what you're getting at here.

If you don't override observeValueForKeyPath:ofObject:change:context:,
how are you supposed to use KVO at all? As far as I understand it,
that is the *only* way to get notified of changes to things you
observe.

Apple's various NSController subclasses handle KVO and bindings for you.
 
NSController subclasses automatically call -valueForKeyPath: or -valueForKey: 
or -setValue:forKey:.  
 
The -observeValueForKeyPath:ofObject:change:context: _does_ interact with 
-valueForKeyPath: because the various NSController subclasses exist in part to 
provide exactly that interaction.
 
You do often need to call  -bind:toObject:withKeyPath:options:.
 
You really don't need to override 
-observeValueForKeyPath:ofObject:change:context:.  Or at least I haven't needed 
to override it because one of the existing NSController subclasses usually 
meets my needs.
_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [EMAIL PROTECTED]

Reply via email to