[newbie] Use of accessors versus direct access of ivars
[newbie] Use of accessors versus direct access of ivars
- Subject: [newbie] Use of accessors versus direct access of ivars
- From: Stuart Malin <email@hidden>
- Date: Thu, 8 Jan 2009 19:27:36 -1000
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 (email@hidden)
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:
This email sent to email@hidden