• 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: Remco Poelstra <email@hidden>
  • Date: Thu, 11 Nov 2010 14:01:45 +0100

Op 11-11-2010 13:48, Graham Cox schreef:

On 11/11/2010, at 11:41 PM, Remco Poelstra wrote:

Leaves me wondering whether I should hardcode all properties (82 items) on my own object or try to make a more intelligent subclass of NSMutableDictionary. Or maybe a composite object?


If the requirement is simply to distinguish between an uninitialised value and a real value, why not just implement your own object with a method -valueForKey: and do whatever you want in there. It could have a NSMutableDictionary as a backing store. One method (not 82) and problem solved.

Sounds so simple I'm surely missing something....

Seems so :) I just tried that and observing the change of properties is now non-functional, as the request for observing is not forwarded to the NSDictionary behind my own object. Seems I've to override a whole lot of methods to forward them all to the backingstore.


Regards,

Remco Poelstra
_______________________________________________

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: Graham Cox <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>)

  • Prev by Date: Re: Detecting reading a key in KVC
  • 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