Re: reading a plist
Re: reading a plist
- Subject: Re: reading a plist
- From: Thomas Harrington <email@hidden>
- Date: Sat, 20 Jul 2002 22:35:23 -0600
On Saturday, July 20, 2002, at 08:10 PM, Koen van der Drift wrote:
If I use the code example from Hillegass' book:
path = [[NSBundle mainBundle] pathForResource:@"test"
ofType:@"plist"];
myList = [NSDictionary dictionaryWithContentsOfFile: path];
myArray = [myList objectForKey:@"testkeys"];
NSLog(@"test = %@", myArray);
Then I get all keys and values. If I use myArray = [myList
objectForKey:@"KeyA2"] then myList is null.
What kind of object is myArray? If an NSArray (as its name implies),
you'll get incorrect results, because the plist you posted doesn't
contain any arrays.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.