Reading/Writing application dictionary files.

2008-07-06 Thread Lemon Obrien
I need to read and write a .dict file to keep state for my application. i'm new to cocoa so i don't know how a cocoa app should handle state files. i do have .dict files as resources in xcode; i've heard, but don't know how to, that you can save .dict file inbetween an application; and that

Re: Reading/Writing application dictionary files.

2008-07-06 Thread David Casseres
Store your state information in an NSDictionary, and write it out using the writeToFile:atomically: method. When you want to read it in, use the NSDictionary class method +dictionaryWithContentsOfFile:. Works great. On Jul 6, 2008, at 7:51 PM, Lemon Obrien wrote: I need to read and

Re: Reading/Writing application dictionary files.

2008-07-06 Thread Scott Anguish
On Jul 6, 2008, at 10:51 PM, Lemon Obrien wrote: I need to read and write a .dict file to keep state for my application. i'm new to cocoa so i don't know how a cocoa app should handle state files. i do have .dict files as resources in xcode; i've heard, but don't know how to, that you