Re: NSData to plist
Re: NSData to plist
- Subject: Re: NSData to plist
- From: crucial felix <email@hidden>
- Date: Fri, 6 Dec 2002 11:59:21 -0500
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.