Re: Re : Proper way to initialize application support file
Re: Re : Proper way to initialize application support file
- Subject: Re: Re : Proper way to initialize application support file
- From: Graham Cox <email@hidden>
- Date: Thu, 18 Feb 2010 23:22:26 +1100
On 18/02/2010, at 11:09 PM, Peter Hudson wrote:
> I'm getting confused.
>
> It seems that any files that are 'essential to the running of the app' are placed in the bundle.
>
> It also seems that any files that are 'essential to the running of the app', if they are in the bundle, must not be modified.
>
> The type of files which I put in the bundle are both essential for the app to run and need ( from time to time ) to be modified.
>
> Copying from bundle to elsewhere and then modifying the copies is not a runner - as the user would want their format data back as it was when they restart the app.
Think of it this way. Files you open directly from your bundle should be considered READ ONLY. Therefore if you want to use a modified version, you have to copy them elsewhere so that they can be read/write, and that somewhere else is usually ~/Library/Application Support/<your app>/<whatever>
I don't see a conflict between this and your users getting the modified versions when they rerun the app. The modified files are still right where you left them. Your app will need to perform some sort of merge between the unmodified bundle version and any modified versions it finds in app support, so that the total set of files the user is working with is the latest. It can be a lot of work - in fact I'm working on something like that right now.
If you mean they need up-to-date files if the app is moved to another machine or installed for another user, there's not a lot you can do about that except instruct them to take the modified files with them. Most apps would not be designed that way.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden