On Aug 29, 2009, at 1:49 PM, Todd Heberlein <[email protected]> wrote:

I've been playing with KVC and KVO with my own setters and getters (along with Controllers) to create virtual ivars. That is, there never is any storage created for the variable and its value is calculated on the fly when the getter is called. This seems to have some cool potential, but it raises the following question:

   Could this break with future Xcode or OS X upgrades?

In other words, is this approach an officially supported way to code by Apple, or do they have the freedom to break this in the future?

If you can't set a value, don't provide a setter. If a setter might not set the value the user provides, disable disable KVO notification for that key and do it yourself.

--Kyle Sluder
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to