• 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 13:41:58 +0100

Op 10-11-2010 15:31, Quincey Morris schreef:
On Nov 10, 2010, at 06:10, email@hidden wrote:

I was just thinking that the overrides would provide a convenient point to process all requests for undefined properties.
Depends on the design and requirements of the model I suppose.

I don't think that's happening here -- the property isn't undefined initially, it just has an incorrect value initially. :)

The point is, I think, to avoid overriding 'valueForKey:', because of the potential horrendous performance problems that could result.

Thanks for all replies. I think I've a problem there. I store all my properties in a NSMutableDictionary, so implementing my own getters is not possible. I tried overriding valueForKey: by subclassing NSMutableDictionary, but soon found out that was not possible as it is a cluster.
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?


Kind 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: "email@hidden" <email@hidden>
    • 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>)

  • Prev by Date: Re: NSTableView within NSScrollView in code
  • 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