Stacks and Sub Stacks

Bob Sneidar bobsneidar at iotecdigital.com
Wed Sep 25 17:05:32 EDT 2019


I like using SubStacks because I only need to open one file to get everything related to a project. Some people don't like using them because there are certain things that happen that you wouldn't expect. For instance, any preOpenStack, openStack, suspendStack, resumeStack etc. messages generated by a SubStack get sent to the MainStack as well, unless you insert stubs to stop the flow of those messages in the SubStack script, or else move them to the openCard script of the first card. Pick your poison. 

Another good reason for SubStacks is that you can get a list of just the stacks that correspond to th MainStack you are working with by getting the SubStacks of the MainStack. Otherwise you would need to get the openStacks, then filter the corresponding list somehow. 

Also the project manager benefits from using SubStacks, as do some utilities provided by other LC devs (thank you all for those BTW). 

There are other reasons I cannot remember just now, but some people don't like using them. It kind of doesn't make a difference if you are creating standalones because the SB by default will separate the substacks out into individual stacks when you create the standalone. 

Bob S


> On Sep 25, 2019, at 06:19 , Patrick Roza via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Looking for some good examples of the Main stack used with sub stacks.
> Looking for best practices on usage. Also using text-only stacks.
> 
> Thanks,
> 
> Patrick





More information about the use-livecode mailing list