Open/write to file

Shari shari at gypsyware.com
Sat Nov 6 16:00:41 EST 2004


Scott,

The application will be wherever the user puts it.  On my system it's 
in a partition where I keep programming things.

There are many files associated with the program.  The scores etc. 
are in a stack that comes with the standalone, and which is stored in 
the folder with the standalone.  At this time I am not separating 
that out for different users.  It needs to be updateable.

There are user-created text files as well.  The user can create a 
text file of high scores and other data, and this file needs to be 
where the user expects to find it, in the program's folder.  It would 
be a mess if these files were outside the folder and the user (or the 
program) had to search for them.  The names of the files are created 
on the fly.

So the short answer is... I still need to deal with permissions.

Up until now, I've not worried about other user accounts.  The 
programs worked or they didn't on those accounts.  But I am updating 
my registration system to accomodate different users, and need for 
the program to function as it does on the main user account.

Shari



>Hi Shari:
>
>Are your text files user-related, like settings, scores or preferences?  If
>yes, and you're talking about installing files in the application's folder,
>it would be easiest for you to avoid doing this altogether.  The Preferences
>(or Documents) folder is best suited for this file, which can be found by
>using the specialFolderPath function.
>
>Also, if you want any user to be able to run your app, you should install it
>in the common (all users) Applications folder, not the Applications folder
>under the user's username.  Then you can avoid many of the permission
>problems you may be running up against.  And since the specialFolderPath
>function can be used to store your text file under the current username
>Preferences, different users running the same app will have their own text
>files installed without you having to do anything.
>
>Let us know if this is not what you're looking for.
>
>Regards,
>
>Scott Rossi


-- 
Mac and Windows shareware games
http://www.gypsyware.com


More information about the metacard mailing list