I have a class with ivars for which there are accessors. I understand that the importance of using a setter method (or to use setValue:ForKey:) to set the ivar so that KVO operates. However, Is there a compelling reason to use, in the methods of a class, a getter method (or valueForKey:) versus directly accessing an ivar of the class?

I have re-read both the Key-Value Observing Programming Guide and Key- Value Coding Programming Guide, and have not derived guidance from them on this question. Perhaps I have missed something.
_______________________________________________

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