[basic] writeToFile .plist best method
[basic] writeToFile .plist best method
- Subject: [basic] writeToFile .plist best method
- From: clunkyrobot <email@hidden>
- Date: Wed, 28 Jul 2004 17:53:31 +1000
hi - I am writing a plist file and have some basic questions.
1- do I need to call my file a somefile.plist can I just give it my own
extension like somefile.myfile?
2- I am allocating the file name dynamically, I did this like this:
fileName = [nameField stringValue];
[records writeToFile:[fileName stringByAppendingString:@".plist"]
atomically:TRUE];
however when I construct a path name for the file as in I wish to save
somefile.plist on the Desktop I am
doing it this way:
noting that records is a dictionary.
[records writeToFile:[ [ [@"~/Desktop/"
stringByAppendingString:fileName] stringByAppendingString:@".plist"]
stringByExpandingTildeInPath ] atomically:TRUE];
Is this the best way, just incase I have to many square braces?
-Kurt
_______________________________________________
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.