shoes / shoes3

a tiny graphical app kit for ruby

Home Page:http://walkabout.mvmanila.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Class widget does not work

dredknight opened this issue · comments

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

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