Q. data stacks and app design
Jeanne A. E. DeVoto
jeanne at runrev.com
Fri Oct 4 14:10:00 EDT 2002
At 10:56 AM -0700 10/4/2002, Alex Rice wrote:
>Is there any way to get Rev to save out only selected substacks into
>seperate files? It would clean up my installation a little bit if
>everything was in the standalone app, except the data substack.
Sure. The canonical way to do this, if your app will be creating its own
1. Include a document-template stack in your stack file.
2. To create a document, use the clone command:
clone stack "Template" -- makes a copy of the substack
set the name of stack it to "Untitled1" -- or whatever
3. To save that cloned stack, use the save command:
set the name of stack "Untitled" to "Saved Stack Name"
save stack "Saved Stack Name" -- brings up standard Save dialog
save stack "Saved Stack Name" as "/Disk/Folder/MyStack.rev"
This saves the stack without bringing up the dialog box. (Depends on
whether this is a user document, or something like a prefs file that the
user doesn't need to set the location and name for.)
There is an example in the "Employee Database" stack that's discussed in
the Independent Study tutorial. The Employee Database creates its own
documents and lets the user save them in this fashion.
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - The Solution for Software Development
More information about the Use-livecode