• 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: "email@hidden" <email@hidden>
  • Date: Wed, 10 Nov 2010 13:58:57 +0000

On 10 Nov 2010, at 12:47, Remco Poelstra wrote:

> Hi,
>
> I've an object which properties I access via key-value coding. These properties are sometimes "uninitialized" (that means, the real value needs to be read from the Wifi network). I would like to detect a read of such property and then fetch it from the network. It's not a problem that in the mean time a "wrong" value is returned. How can I detect a read of a property?
>
> Kind regards,
>
> Remco Poelstra
>
>

Try overriding your objects -valueForKey: and -valueForKeyPath:
NSKeyValueCoding is implemented as a category on NSObject so will be available on your object.

Regards

Jonathan Mitchell

Developer
Mugginsoft LLP
http://www.mugginsoft.com

_______________________________________________

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: Quincey Morris <email@hidden>
References: 
 >Detecting reading a key in KVC (From: Remco Poelstra <email@hidden>)

  • Prev by Date: Re: image arithmetic
  • Next by Date: Re: image arithmetic
  • Previous by thread: Detecting reading a key in KVC
  • Next by thread: Re: Detecting reading a key in KVC
  • Index(es):
    • Date
    • Thread