Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSData to plist



thanks vince !

plist = [[NSDictionary alloc] initWithContentsOfFile:[@"~/Music/iTunes/iTunes Music Library.xml" stringByExpandingTildeInPath]];

vince

On Friday, December 6, 2002, at 03:03 AM, Jirtme Laurens wrote:
Le vendredi, 6 dic 2002, ` 04:57 Europe/Zurich, crucial felix a icrit :

i try using this: NSPropertyListSerialization method:
+ (id)propertyListFromData:(NSData *)data mutabilityOption:(NSPropertyListMutabilityOptions)opt format:(NSPropertyListFormat *)format errorDescription:(NSString **)errorString

he he he, you mismatched the types
here is the right code

NSString * errorString;
int format;

[NSPropertyListSerialization
propertyListFromData:data mutabilityOption:NSPropertyListMutableContainersAndLeaves
format: &format
errorDescription:&errorString];


if(errorString)
{
NSLog(errorString);
[errorString autorelease];
}

ah i see. i knew the string was wrong. but the format was wrong too.
moral: i am asking it, not telling it.
merci !



-felix
_______________________________________________
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.

References: 
 >Re: NSData to plist (From: Jérôme Laurens <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.