• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: virtual ivars
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: virtual ivars


  • Subject: Re: virtual ivars
  • From: Kyle Sluder <email@hidden>
  • Date: Sat, 29 Aug 2009 14:38:19 -0700

On Aug 29, 2009, at 1:49 PM, Todd Heberlein <email@hidden> 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@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


  • Follow-Ups:
    • Re: virtual ivars
      • From: Todd Heberlein <email@hidden>
References: 
 >virtual ivars (From: Todd Heberlein <email@hidden>)

  • Prev by Date: Re: Core Data observer exception in 10.6
  • Next by Date: Re: virtual ivars
  • Previous by thread: virtual ivars
  • Next by thread: Re: virtual ivars
  • Index(es):
    • Date
    • Thread