On Dec 1, 2012, at 12:48 PM, Gordon Apple wrote: > On 12/1/12 10:29 AM, "Kyle Sluder" <[email protected]> wrote: > >> Sounds like NSButton is not KVO-compliant for `state`. > > Well, its bindings certainly work, and the observers works when its state is > changed by the distant (also bound) button.
Nothing about NSButton's bindings workings imply that its "state" property is KVO-compliant. If something calls -setState: on the button (including KVC, while carrying out -setValue:forKey:), then that will generate KVO change notifications. That's because -setState: conforms to the accessor naming conventions, so KVO can hook it. However, when the button changes its own state in response to mouse events, it may not go through -setState: or otherwise be KVO-compliant. It could just set an instance variable. That's invisible to KVO. Regards, Ken _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
