• 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: Sorting through .plist in NSDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting through .plist in NSDictionary


  • Subject: Re: Sorting through .plist in NSDictionary
  • From: Jerry Krinock <email@hidden>
  • Date: Wed, 25 Mar 2009 20:49:44 -0700


On 2009 Mar 25, at 19:53, Pierce Freeman wrote:

I am attempting to sort through the contents of a .plist file in
NSDictionary, but am running into some problems. Since .plist files are
kind of like a "tree", I can't just call objectForKey as there is no way for
me to return the instance that I am looking for. How would someone get a
certain key for each part of the tree?

-valueForKeyPath:

If your key path is in the form of an array, use this from my NSDictionary helpers...

- (id)valueForKeyPathArray:(NSArray*)keyPathArray {
    NSString* keyPath = [keyPathArray componentsJoinedByString:@"."] ;
    return [self valueForKeyPath:keyPath] ;
}

_______________________________________________

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: Sorting through .plist in NSDictionary
      • From: Michael Ash <email@hidden>
References: 
 >Sorting through .plist in NSDictionary (From: Pierce Freeman <email@hidden>)

  • Prev by Date: RE: Reading one line at a time using NSFileHandle
  • Next by Date: Porting BASIC text mangling app to Objective-C
  • Previous by thread: Sorting through .plist in NSDictionary
  • Next by thread: Re: Sorting through .plist in NSDictionary
  • Index(es):
    • Date
    • Thread