Confirming a Save command
Shari
gypsyware at earthlink.net
Tue Sep 17 07:53:01 EDT 2002
>I've tested this procedure out, and have found that on the Macintosh
>platform, if the stack being saved is locked, the save command produces a
>copy of the stack with the same name and followed by a tilde. One also
>gets a message in the result variable which says "Can't open stack file".
>If you save a second time, the message in result is "Can't open stack
>backup file".
If it's the wording that bothers you, you can go into the Metacard
Menu Bar stacks and change the wording. I did that with the "Save"
dialog stack, to use File instead of Stack. I have not used it in a
standalone yet, but it works fine in development mode.
Then just make sure to embed/import that stack into your project.
Also, my current project has a save file. This file is critical to
the program. It reads the file on launch, pulls out a bunch of
information such as user preferences, high scores, etc. and puts them
into the program, since a standalone cannot "remember". The program
saves to this file often, behind the scenes. If the file gets
mangled, the program will follow.
So I have a set of data on card 2 of the "save" stack, a set of
default information. When it launches, it checks the status of the
saved data on card 1. Making sure numbers are numbers, if there are
supposed to be 5 items, there are. If a value is supposed to be A or
B, it is one of them. And if this check fails, the stack will pull
the "default" data from card 2, which doesn't change, put it into
card 1, and launch in "default" mode. The user will have to reset
preferences and create new high scores, but at least they won't have
to reinstall the program, if the data gets mangled.
Shari C
--
--Shareware Games for the Mac--
http://www.gypsyware.com
More information about the metacard
mailing list