Each stack or flow can be edited at runtime, meaning that elements can be appended to or removed from them at will. The most basic way to do this is by using the clear method. Calling clear on any stack or flow removes all the elements from it. You also have the option to pass clear a block that defines a number of new elements to go inside of it. This can be used as a quick way to clear and replace the elements of a stack or flow.
Shoes.app :width => 200, :height => 140 do
@times = 0
stack do
button "Press me" do
@times += 1
@p.clear { para "You pressed me #{@times} ti mes" }
end
@p = flow
end
end


