Search code examples
rubylinuxubuntushoes

Ruby Shoes doesn't work with symbols


I've installed Shoes at Ubuntu, and it doesn't work correctly. Example:

it doesn't work

     Shoes.app :width => 200 :height => 300 do
    button("Hello"){
        alert("DaBuDi")
    }
end

it writes "syntax error" in the Shoes window...

 Shoes.app do
    button("Hello"){
        alert("DaBuDi")
    }
end

And it works.

I've installed Shoes following the instruction at https://github.com/shoes/shoes/wiki/Building-Shoes-on-Linux


Solution

  • You missed , between hash pairs

    Shoes.app :width => 200, :height => 300 do
    

    maybe it is better to ()

    Shoes.app(:width => 200, :height => 300) do