Running a Ruby class from a Shoes Edit Line -


hello all,

i have finished writing ruby class complete supposed to, since ruby, have been running through terminal , need more user-friendly (i.e. have gui). googled , came across shoes, seems nice ruby gui toolkit, , looking for. however, despite googling can't seem figure out how use shoes gui edit line send argument class made. here edit line

shoes.app background white para "application name" stack(margin: 12) para "message" flow edit_line button "enter" end end end

in short, there way gets.chomp (or literally else similar) , set equal instance variable?

yes! assign elements want keep track of instance variables, , pass block button (the block gets executed when button clicked). try this:

shoes.app    background white   para "application name"   stack(margin: 12)     @message = para "message"     flow       @edit_line = edit_line       button "enter"         @message.text = @edit_line.text       end     end   end end 

Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -