If I have a property foo and it's boolean and has the getter/setter 
isFoo/setFoo:, what's the correct key path to observe for KVO, assuming default 
automatic KVO generation as provided by NSObject, is it 'foo', or is it 
'isFoo'? 

It seemed to me that the method which triggers automatic KVO (setFoo:) only 
knows about its own signature and so would send a KVO notification for key path 
'foo'. However NSOperation (for one) is documented to 'be KVO compliant for the 
property isFinished' and indeed you have to observe 'isFinished' if you want 
notifications. 

If indeed the default KVO code generates notifications for 'foo' should you, if 
you have a boolean property using the 'isXXX' syntax, avoid default KVO and 
trigger your own property changes for isXXX? 
_______________________________________________

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