Re: Best Place To Save States
Re: Best Place To Save States
- Subject: Re: Best Place To Save States
- From: Paul Lynch <email@hidden>
- Date: Fri, 28 Apr 2006 16:51:55 +0100
On 28 Apr 2006, at 16:42, Jerrod Fowkes wrote:
Hello, I need the ability to save off a state for my application.
By that I mean I need to remember some data that was filled in on
my form. Currently I am using the main bundle to load Images at
runtime. With that, I need the ability to write to a file somewhere
on the system if it existed, and if not then I would have to create
it.
My question is, where is the best place to create this file? is
just tilde slash a good place?
Is it the standard to throw in a blank file in the resources and
then I can write and read to that?
You can't assume that you can write inside your app wrapper. Also,
writing to ~ without permission is considered impolite.
The approved location (although I have never found this in the docs)
is /Library/Application Support or ~/Library/Application Support. If
you are writing to 10.4, look for NSApplicationSupportDirectory, like:
NSArray *paths = NSSearchPathForDirectoriesInDomains
(NSApplicationSupportDirectory, NSAllDomainsMask, YES);
Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden