As my understanding of Bindings is that they implement using KVO and KVC, then is it safe to assume that if an object has a bindable property, then that property should be observable with KVO, yes?

My specific concern is with NSSegmentedControl, which has a bindable property "selectedIndex". I am trying to add an observer for this property (using -addObserver: on an instance). Alas, I am not getting an observer event (i.e, invocation of my -observerForKeyPath:... method) when I change the segmented control in the U/I. So, either I have done something incorrectly in setting up the observer, or this is not an observable property.

In searching the archives, I came across a statement by mmalc that View's don't emit KVO notifications (http://www.cocoabuilder.com/archive/message/cocoa/2007/6/29/185375 ). If this is so, then how can the NSSegmentedControl (which is an NSView) support bindings?


_______________________________________________

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