• 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: Detecting reading a key in KVC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting reading a key in KVC


  • Subject: Re: Detecting reading a key in KVC
  • From: Graham Cox <email@hidden>
  • Date: Fri, 12 Nov 2010 09:57:43 +1100

On 12/11/2010, at 3:30 AM, Ken Thomases wrote:

> You should not override -setValue:forKey: or -valueForKey: if you can avoid it.  Instead, implement the methods -setValue:forUndefinedKey: and -valueForUndefinedKey:.  They are precisely for implementing "dynamic" properties in this manner.


Understood, but the OP's problem as I understand it is that it's not that the key is undefined, but the value associated with it is uninitialized. So rather than return nil, or zero, he wants to trigger a remote fetch of the value. KVC doesn't appear to provide a mechanism for that out of the box.

--Graham


_______________________________________________

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: Detecting reading a key in KVC
      • From: Ken Thomases <email@hidden>
    • Re: Detecting reading a key in KVC
      • From: Lee Ann Rucker <email@hidden>
    • Re: Detecting reading a key in KVC
      • From: Kyle Sluder <email@hidden>
References: 
 >Detecting reading a key in KVC (From: Remco Poelstra <email@hidden>)
 >Re: Detecting reading a key in KVC (From: "email@hidden" <email@hidden>)
 >Re: Detecting reading a key in KVC (From: Quincey Morris <email@hidden>)
 >Re: Detecting reading a key in KVC (From: "email@hidden" <email@hidden>)
 >Re: Detecting reading a key in KVC (From: Quincey Morris <email@hidden>)
 >Re: Detecting reading a key in KVC (From: Remco Poelstra <email@hidden>)
 >Re: Detecting reading a key in KVC (From: Graham Cox <email@hidden>)
 >Re: Detecting reading a key in KVC (From: Remco Poelstra <email@hidden>)
 >Re: Detecting reading a key in KVC (From: Graham Cox <email@hidden>)
 >Re: Detecting reading a key in KVC (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: RTFDFromRange returns different data
  • Next by Date: Re: Detecting reading a key in KVC
  • Previous by thread: Re: Detecting reading a key in KVC
  • Next by thread: Re: Detecting reading a key in KVC
  • Index(es):
    • Date
    • Thread