• 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: Is it possible to traverse dictionaries and arrays using KVC?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it possible to traverse dictionaries and arrays using KVC?


  • Subject: Re: Is it possible to traverse dictionaries and arrays using KVC?
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 16 Aug 2011 13:02:30 -0700

On Tue, Aug 16, 2011 at 12:52 PM, Jens Alfke <email@hidden> wrote:
>
> On Aug 16, 2011, at 11:03 AM, Tito Ciuro wrote:
>
>> In KVC, the setValue:forKeyPath: method is super handy to set values in deep hierarchies. I was wondering if it would be possible to access array elements using KVC.
>
> I asked this a couple of weeks ago and was told the answer is “no”. Apparently because implementing KV observing of such key paths would be too difficult.

Tito is asking about KVC, not KVO (or in the case of your question, bindings).

Either way, I believe you're correct, and there's no way to get at
individual indexed members of an ordered collection via
-valueForKeyPath:.

--Kyle Sluder
_______________________________________________

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: Is it possible to traverse dictionaries and arrays using KVC?
      • From: Quincey Morris <email@hidden>
References: 
 >Is it possible to traverse dictionaries and arrays using KVC? (From: Tito Ciuro <email@hidden>)
 >Re: Is it possible to traverse dictionaries and arrays using KVC? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Is it possible to traverse dictionaries and arrays using KVC?
  • Next by Date: Re: Options to defaults or commandline
  • Previous by thread: Re: Is it possible to traverse dictionaries and arrays using KVC?
  • Next by thread: Re: Is it possible to traverse dictionaries and arrays using KVC?
  • Index(es):
    • Date
    • Thread