Updating Text-Script Only Stacks in Run-Time, Message Path Memory

Richard Gaskin ambassador at fourthworld.com
Mon Nov 7 11:24:37 EST 2016


Mark Waddingham wrote:

 > The point here is that the purpose of script-only stackfiles is
 > purely that of storage - storage in a form which means they work
 > well with version control such as git.

This can't be stressed enough.

The only difference between script-only stacks and traditional binary 
stacks is what's stored when saving.

As the term makes explicit, with a script-only stack the only thing that 
gets saved is the stack script.

In every other way they are identical. Indeed, as far as I can tell once 
they're loaded they are indeed the exact same structure in memory as any 
other stack.

And like any stack, as long as they're in memory you can do anything you 
like with them, even adding cuatom props or substacks.

But when you save, only the script will be preserved, as the name tries 
to make clear.

This may be useful for allowing ephemeral data to be bound to such a 
stack at runtime, safely refreshed with each session by virtue of never 
having been saved at all.

And of course if you need persistence with such additions, just use a 
traditional binary stack.

Conversations about script-only stacks have been much more complex than 
the subject itself.

If it helps, there is only one rule to remember:

    A stack object is a stack object; the only difference
    with a script-only stack is that only the stack script
    is saved to disk.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list