Common Background Group Across Multiple Stacks

Sannyasin Brahmanathaswami brahma at hindu.org
Sat Apr 16 15:35:02 EDT 2016


This is a “How do you do it?” question  as I’m sure many of have already solved this in one or more ways.

Context: 1 main stack that has a group on the bottom which is the “tab-tool bar” which is sent to background behavior and runs on the bottom of most cards-screens in the app.

1 or more “Module” stacks that are not substacks of the main stack. Some of these may be script-only stacks that instantiate a new card and build UI dynamically and others will be binary stacks with a minimalist UI + some associated text only stacks.

Now: we want the “module” stacks to pick up the bottom group tab-tool bar that is on the main stack. The button scripts will be a complete reference e.g. “go card 1 of stack “theMainStack”  such that if clicked on any module stack… it will open the main stack… and if clicked on the main stack, it simply goes to card one.

So what is the best way to instantiate this “global group” across independent stacks. I can think of several options…

1. you could go to the trouble of turning it in a widget (Ah… if only I knew how… I think this is a use case where it make sense) and somehow dynamically include that in your module stacks (above my pay grade at the moment “dunno”)
2.  you could create a text only script to dynamically build that group, run time (a pain)
3.  you could copy the group into memory the pasted into the module stack, run time
4.  you could make the group part of a library stack and some how call this from the other stacks
5  you could 100% hands on and just tell yourself and the team: “copy the group from the main stack to your module stack”

The great thing about Livecode is the incredible flexibility to get things done, but some methods are better than others.

How do you/ would you  do it?

BR




More information about the use-livecode mailing list