Standalones and saving data

Jeanne A. E. DeVoto jeanne at runrev.com
Tue Apr 15 16:17:15 EDT 2003


At 4:22 AM -0700 4/15/03, Neil Phillips wrote:
> Can a mainstack be converted to a substack?

Yes: just set its mainStack property to the name of the stack you want to
move it to:

  set the mainstack of stack "Substack-to-Be" to "My Main Stack"

>I'm hoping to convert a
>mainstack that needs to store data into a substack of a standalone and
>store it in a different file. Alternatively, would it be better to simply
>keep it as a separate stack and link to it from the standalone.

Either way will work, as long as you're saving to a separate file. Which
way is best depends on what kind of stack it is. For example, if your app
can create documents and you want the user to be able to create and save a
separate stack file, one way is to store a template stack as a substack of
your app's main stack. Then, to create a "new document", you clone this
template stack. When it's time to save, you save the clone as a separate
stack file.

On the other hand, if this is a data stack that the user normally doesn't
deal with directly, it may be better to keep it as a separate file in a
"data" folder.

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - Software at the Speed of Thought
http://www.runrev.com/





More information about the use-livecode mailing list