Script Only Stack Behaviors and Nesting
bobsneidar at iotecdigital.com
Wed Jun 27 18:50:05 EDT 2018
I'm getting heavily into behaviors and script only stacks now (in preparation for Levure Framework) because my project has become complex enough to make it almost inevitable. I have perhaps 20 or so substacks in a mainstack. All the substacks have quite a bit of shared behavior, so I created a button with the common code for all the stacks, then set the behavior of each stack to the long ID of that button. So far so good. It works famously.
But I also took the non-common code for each stack, and saved each one as a .livecode script only stack but have yet to set the behavior of the substacks to them. I will eventually do the same for the common code behavior mentioned above.
Now I want to nest the behaviors in such a way so that each stack can avail itself of both behaviors. So the first question is, Which behavior should be the first behavior I set the stack to, or does it matter? The next is, how do I nest behaviors of script only stacks? I know I can set the behavior of one button to the behavior of another whose behavior is that of another etc. But how do I do that with script only stack files?
More information about the Use-livecode