Best Practice: Prevent Substacks from Triggering Main Stack Scripts

Bob Sneidar bobsneidar at
Fri Feb 6 14:38:14 EST 2015

There are some advantages to using substacks methinks. The monistic automatically “knows” about the substacks without any extra coding or adding the stacks to the main stack files property. Also, I am not sure that graphics loaded in the main stack will be accessible to any stacks that are not substacks of the same. Thirdly, if you don’t want anyone to open the substack without first opening the main stack, a simple “if the mainStack of me is me then get the hell out” sort of command in the openStack script is all you need. There are probably some others. Not sure but if you password protect the main stack, aren’t the substacks inaccessible as well? Finally, I think it looks good organizationally. Just my humble opinion tho’.

Bob S

On Feb 6, 2015, at 01:12 , Mark Schonewille <m.schonewille at<mailto:m.schonewille at>> wrote:

Hi Brahmanathaswami,

It isn't obligatory to use substacks. You could use two mainstacks simultaneously. Just make sure to include the additional mainstacks as files when you build a standalone.

With two mainstacks, the scripts in one stack won't be triggered by messages from the other. If you have handlers that you want to use in both stacks, you can put those handlers into another separate stack and use that as a library with the start using command or by defining front and back scripts.

Best regards,

Mark Schonewille

More information about the use-livecode mailing list