Re: plist files
Re: plist files
- Subject: Re: plist files
- From: Georg Tuparev <email@hidden>
- Date: Fri, 30 Jan 2004 09:15:03 +0100
On Jan 30, 2004, at 7:40 AM, Satoshi Matsumoto wrote:
The document is available at
ADC Home > Documentation > Cocoa > Data Management > Archives and
Serializations> Serializing Objects
And sample code is:
saving a dictionary as a plist file at thePath
NSData *plistData;
NSString *error;
plistData =[NSPropertyListSerialization
dataFromPropertyList:dictionary
format:kCFPropertyListXMLFormat_v1_0
errorDescription:&error];
[plistData writeToFile:thePath atomically:YES];
......
Too much typing!
How about just this:
[dictionary writeToFile:path atomically:YES];
... or similar if the root object is an NSArray...
-- georg --
"War is God's way of teaching Americans about geography."
Ambrose Bierce, writer (1842-1914)
_______________________________________________
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.