Some Basic Misunderstandings/Problems with RunRev - aka Help!

J. Landman Gay jacque at hyperactivesw.com
Wed Apr 14 14:27:46 EDT 2004


On 4/14/04 1:03 PM, David Burgun wrote:

> Then PLEASE could someone just tell me how I save a Standalone Stack 
> PLEASE!!! I've been asking questions about this all day and I'm just 
> going round and round and round in circles.

There is an OS restriction in Windows, in all varieties of Unix, and in 
OS X that forbids an application from saving itself. This isn't a Rev 
limitation, it is in the OS. The only operating system that does/did 
allow an application to be saved is OS 9, which is now going obsolete. 
To retain consistency, Rev simply doesn't allow even OS 9 standalones to 
alter themselves and save themselves to disk. So, a built standalone 
cannot be saved under any circumstances. Since no other operating 
systems allow it, and since almost all OS 9 applications outside of 
HyperCard do not save to themselves, it is mostly only ex-HyperCard 
users who find this to be a disadvantage.

That being said, there are ways around it, and these methods are what 
all other developers use for all other apps. Basically, you keep the 
standalone separate from its data. You can do this in two ways, but both 
ways require that you have two files on disk: the standalone, and some 
kind of data repository.

The first way is to write the data to a text file. When the app closes, 
it saves the data to the text file, and when it opens it reloads the 
data. Since you've mentioned that you have a lot of controls and cards, 
this probably isn't the best way for your situation.

The second way is to just save the stack itself as the data repository. 
When you do that, it functions exactly as HyperCard did. Your standalone 
becomes the equivalent of the HyperCard Player, and your stack runs as 
an independent stack which can easily be saved. That's how I'd suggest 
you do it. It will mirror the experience you had in HyperCard.

To do that, create a one-card stack with almost nothing in it. Most 
people use a splash screen image on the first card. That way when the 
app opens, users will see the splash image for a moment before your 
actual stack opens. This is the stack you would make into a standalone. 
It contains no data, just your splash image. The first card should have 
a handler something like this:

   on openstack
    wait 3 seconds
    go stack "myDataStack"
   end openstack

Users will double-click your standalone, see your splash image for a few 
seconds, and then your data stack (called "myDataStack" here) will open. 
After that, the stack functions as you expect and you can save it at 
will with this command:

   save this stack

Does that help?

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com


More information about the use-livecode mailing list