How to save data from standalone?

Dave Cragg dcragg at lacscentre.co.uk
Mon Feb 6 17:35:58 EST 2006


On 6 Feb 2006, at 21:54, Marielle Lange wrote:
>
> Using pathToUsersDocumentsFolder would therefore be a better  
> approach, but I don't really want to create a file within this  
> folder as the file is in a completely adhoc format that would  
> puzzle anybody who come across it.

It's not uncommon to see folder and files created by various  
applications in the OS X Documents folder (specialFolderPath 
("docs")). In mine I see the following folders:

Acrobat User Data
Adobe Reader
AppleWorks User Data
Eudora Folder
Finding Out (children's learning prgram)
Micosoft User Data
ScanWizard 5 Folder
Virtual PC List

And most of the files in these folders are puzzling, to say the least.

On Windows, the user's Application Data folder (specialFolderPath 
(26)) is the normal place to put this kind of stuff. Although on a  
standard Window's installation, this folder is invisible, and it can  
be tricky to direct a user to find the folder if, for example when  
things go wrong, you ever need them to delete it, or retrieve a file.

There's also a "Local Settings" version of the Application Data  
folder (specialFolderPath(28)) which will always remain with the  
local machine and won't get transferred to a user's network roaming  
profile. It's typically used for cached data that isn't critical but  
may be large.

>
> Has anybody ever tried the     User/Library/Application  
> Support       way? Is there any problem associated with this solution?

I don't think there's a direct way to get this path using  
specialFolderPath. However, you can use specialFolderPath("asup") to  
get the "root level" Application Support folder path (e.g. /Library/ 
Application Support) and then append this to the $HOME environment  
variable.

   put $HOME & specialFolderPath("asup") into tAppSupPath

For a full listing of the specialFolderPath codes, see Ken Ray's site:

http://www.sonsothunder.com/devres/revolution/tips/file010.htm

Cheers
Dave



More information about the use-livecode mailing list