shoes / shoes3

a tiny graphical app kit for ruby
http://walkabout.mvmanila.com
Other
181 stars 19 forks source link

Class widget does not work #436

Closed dredknight closed 5 years ago

dredknight commented 5 years ago

Decided to play a bit and create a widget but something unexpected happened. Execute the code below and press the button. The app crashes (Shoes.quit) on C level because the window disappears.

Why is this happening?

class Box_counter < Shoes::Widget

    def initialize() 
        flow;
    end 

end

Shoes.app do

    button "press" do
        Box_counter.new;
    end

end
dredknight commented 5 years ago

My bad. There is no need for ".new" to create the object. Next time I should not forget I am noob at Ruby...