saving and restoring field contents

mattiasa Mattias.Alveteg at chemeng.lth.se
Mon Dec 16 09:27:01 EST 2002


When closing a standalone stack I have, I would like all the 
information I had in it's fields and all other settings (hilites of 
radio buttons and check buttons) to  be remembered and to appear next 
time I open this standalone stack.

I've implemented this by saving all the information to a text file and 
then reading that back in again. My problem is to find a good path for 
such a file (especially since there might be duplicates of this stack 
and each duplicate should preferably remember different settings).

With Mac OS X I tried the following script to give me a name (putting 
the file in the same folder as the standalone, thus assuming that the 
logged in user is allowed to write in that folder).

My script uses

put filename of this stack into thename

and then figures out in what folder (i.e. directory) it resides.

It works fine as long as I don't make the stack standalone. A 
standalone under Mac OS X is, however, like a folder with the actual 
stack as a file somewhere in its inner hierarchy . Using the script 
above will thus give me a path *inside* the application (... 
myStackName.app/contents/MacOS/ ) and since such a path is read-only I 
get a "can't open that file" error.

Any suggestions?




More information about the metacard mailing list