Stacks and Sub Stacks

dunbarx at aol.com dunbarx at aol.com
Wed Sep 25 15:44:49 EDT 2019


Hi.

Substacks are below (Hi, Jacque) the mainStack which own them in the message
hierarchy. Try this:

Make a new stack, name it "Main1". Make a sub stack of that stack, and name
it "Sub1". Put this into the script of the main stack:

on mouseUp
  answer "Main" && random(99)
end mouseUp

Now put this into the script of the subStack:

on mouseUp
  answer "Sub" && random(99)
  -- pass mouseDown
end mouseUp

If you click in the mainStack, you will get "Main...". If you click in the
subStack, you will get "Sub..." If you uncomment the "pass" statement in the
subStack, and click in the subStack, you will get both.

So like any object in the hierarchy, you have to manage your messages.

I really do not like the use-list.

Craig


More information about the use-livecode mailing list