Page 1 of 1
How to set up a substack from 2 mainstacks
Posted: Sun Mar 17, 2013 10:39 am
by Iluvatar
I have 2 debugged stacks (both mainstacks at present).
How do I set these up so that one is a substack of the other (at runtime); and they display their respective first cards?
I have been trying a few things but no good so far .....
Thanks.
Re: How to set up a substack from 2 mainstacks
Posted: Sun Mar 17, 2013 4:35 pm
by sturgis
Open both stacks. Look at the property inspector for the stack you wish to be a substack
set its mainstack property to point at the stack that you want to be main.
Save the mainstack. At this point you will still have a copy of the stack that is now a substack, but there is also a copy integrated into the stackfile of the mainstack.
If you want both stacks to open on launch you can add code to your mainstack (in openstack, opecard or wherever seems appropriate for your purposes) that will open the substack.
go stack "stackname" will open and focus on the stack. Since its now a substack you don't have to specify a file path. (though if you want each to remain as mainstacks you can go stack "/path/to/stackfile.livecode"