Mainstack Substack clarification

Jim Ault JimAultWins at yahoo.com
Mon Dec 31 15:07:14 EST 2007


On 12/31/07 11:39 AM, "Mark Swindell" <mdswindell at cruzio.com> wrote:

> I'm just clarifying for myself what happens to a stack when its  Main
> Stack property is changed.
A bit more accurate phrasing will help:

The YellowStack is opened in memory is saved to the hard drive in the same
location with same file name .

The BlueStack is opened in memory, is redefined as a substack of the main
stack YellowStack (which is also open at this time or it will not appear in
the drop down menu of the inspector palette), then the save operation saves
the file that the YellowStack is in, to the hard drive in the same location
with same file name.

The result is that there were two files in the beginning, and there are
still two files.  The difference is that the BlueStack stack exists in both
files.  After the last step above, the stack named "BlueStack" exists in
memory as the subStack version.  Since there can only be one stack of the
same name open in memory with Rev, both stacks named "BlueStack" cannot be
edited at the same time.

The file name of the stack "BlueStack" can also be "BlueStack.rev", but it
can actually be any name.  Try quitting Rev, renaming the files on the hard
drive to banana.rev and blueberry.rev, then opening banana.rev, then
blueberry.rev to see the effect.

Be careful in your concept of stack vs file-on-the-hard-drive vs stack in
memory in the development environment.  A stack is stored in the file.  A
substack is stored in the same file as the main stack (there can only be one
main stack).  In memory, a sub stack has/sub stacks have, a different
message hierarchy than the main stack.

Hopefully this will be clear, but of course, confusing at first.

Jim Ault
Las Vegas
wondering what Devin is doing on a holiday answering email :-)

On 12/31/07 11:39 AM, "Mark Swindell" <mdswindell at cruzio.com> wrote:

> I'm just clarifying for myself what happens to a stack when its  Main
> Stack property is changed.
> 
> Scenario:
> Main stack "YellowStack" is opened and saved.
> Main stack "BlueStack" is opened and saved.
> 
> Now, in BlueStack's stack inspector I change its MainStack property
> to "YellowStack."  BlueStack is "subsumed" as a substack of
> YellowStack, while its original incarnation, BlueStack, remains on
> disk as a main stack, in its last saved state?
> 
> Is this accurate?
> 
> Thanks,
> Mark
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list