Dominik Honnef
1/19/2008 12:39:00 PM
In my opinion, a binding to wxWidgets is a great chance for GUIs with ruby, but I'm wondering, if its very ruby-like.
Lets take the following extract of the tutorial (frames, part 1)
[code]
btn = Wx::Button.new(panel, -1, name + " (Close me)", Wx::Point.new(45,55))
evt_button(btn.get_id()) {|event| destroy()}
[/code]
In my opinion, the button itself should handle its events and not the frame.
And even if the frame has to handle it, why does evt_button await an ID and not simply the button instance itself?
Maybe there are good reasons for this behaviour, but I cant see them.
--