I’m having a big issue here. I can’t communicate between shoes stacks.
Here is a resumed exemple, in order to show the problem:
Shoes.app do
stack :width => "100%", :height => "25%" do
button "" do
a.show
end
end
a = stack :width => "100%", :height => "25%", :hidden => true do
b = para "lol"
end
end
As you have understood, it can’t work because the variable a is declared before being able to be used. However, I have a lot of things I have to append to the second stack thanks to a button on the first stack, it is not possible at all. I don’t know if there’s a way.
I have to keep the order of the stacks. I don’t want the “a.show” be after the “a” stack.
Thanks
Don’t use global variables (those prefixed with
$). That’s bad practiceUse instance variables prefixed with
@and that will be visible across the Shoes flows.You’re working inside of an App object, and you should be using instance variables.
Check out the Shoes Rules for more information.