Open/write to file

Scott Rossi scott at tactilemedia.com
Sat Nov 6 11:47:54 EST 2004


Recently, Shari wrote:

> Another permissions issue on OSX (and presumably Windows):
> 
> Standalone is installed on main user account.  It can create text
> files in its same folder.
> 
> Log out, and log in as another user.
> 
> Standalone runs, but will not create text files.
> 
> Any ideas?  This needs to work on any computer the standalone is
> installed on, not just mine, so the solution must be in the code
> itself.

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
Creative Director
Tactile Media, Development & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com



More information about the metacard mailing list