• 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: plist files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: plist files (From: Satoshi Matsumoto <email@hidden>)

  • Prev by Date: Re: NSObject description not working
  • Next by Date: UndoManager Notifications
  • Previous by thread: Re: plist files
  • Next by thread: Problem creating PreferencePane Project in Xcode
  • Index(es):
    • Date
    • Thread