Hi,

On Apr 3, 2005 3:41 PM, tony summerfelt <snowzone5 / hotmail.com> wrote:
> On Sun, 3 Apr 2005 03:47:46 +0900, you wrote:
> 
> >I see. What do you consider the most difficult (GUI-wise) to do in
> >Ruby that is easy in Tcl/Tk? Maybe a little list with 3 items? :-)
> 
> i guess if you know the api in question nothing is 'difficult' in
> ruby.
> 
> with tcl/tk it how little typing i have to do. the tkblog interface is
> about 20 mostly short lines of code.  which took me about two minutes
> to type up.
> 
> with the example i posted before:
> 
> button .b -text "quit" -command{exit}
> pack .b
> 
> it puts up a window, with one button. click on the button it exits.
> what's the equivalent of that in the various ruby gui api's?

In my own library I use something like:

require 'gr/gtk_rules'
GR.app{|w| w.hpack GR::GRButton.new('quit').sc{ GR.quit } }

I think this could be reduced even further to

require 'gr/gr'
app{|w| w << button('quit'){ quit } }

Or something like that, but I'm not going to do it yet. I have a new
project starting tomorrow and after that I have so much to work on
still -- like developing one thing or two for the Wee Web-Framework...
Anyway, I think people would be better off by using their own custom
Ruby library for GUI programming. :-)

Cheers,
Joao