• 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: NSDictionary setValue KVO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDictionary setValue KVO


  • Subject: Re: NSDictionary setValue KVO
  • From: Ken Thomases <email@hidden>
  • Date: Sun, 10 Oct 2010 16:23:34 -0500

On Oct 10, 2010, at 4:00 PM, Quincey Morris wrote:

> On Oct 10, 2010, at 12:57, Ken Thomases wrote:
>
>> and b) what the heck "myDict.@allValues" is supposed to mean.  I'm not aware of that being a valid KVC collection operator.
>
> From the discussion of -[NSDictionary valueForKey:] in the class reference:
>
>> If key does not start with “@”, invokes objectForKey:. If key does start with “@”, strips the “@” and invokes [super valueForKey:]with the rest of the key.

OK, thanks for pointing that out.  I wasn't aware of that.  (May have known it once, but forgot it thoroughly if so.)

However, that would seem to make it even less likely that it would be possible to key-value-observe such a keypath.  There's no override of -addObserver:forKeyPath:options:context: documented, which would seem to be required to support observing such '@'-prefixed keys.  Nor is there any discussion of it in the class overview.

Regards,
Ken

_______________________________________________

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

References: 
 >NSDictionary setValue KVO (From: Trygve Inda <email@hidden>)
 >Re: NSDictionary setValue KVO (From: Keary Suska <email@hidden>)
 >Re: NSDictionary setValue KVO (From: Ken Thomases <email@hidden>)
 >Re: NSDictionary setValue KVO (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: NSDictionary setValue KVO
  • Next by Date: Re: NSDictionary setValue KVO
  • Previous by thread: Re: NSDictionary setValue KVO
  • Next by thread: How did gcc handle synthesized atomic vs custom nonatomic setter/getter?
  • Index(es):
    • Date
    • Thread