# Looking for better Ruby/Tk references

**URL:** <https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495>\
**Category:** ruby-talk\
**Created:** [21 December 2005 15:28 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495 "2005-12-21T15:28:14Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris4](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Chris4](https://rubytalk.org/u/Chris4)\
**Post date:** [21 December 2005 15:28 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495/1 "2005-12-21T15:28:14Z")

</div>

... or better GUI APIs for Ruby.  
(Primary questions at the bottom)

- Long Version/Background -  
Hello all and sorry for the disruption, but I'm mid-stream of learning  
Ruby and I have some GUIs I want to write. However Ruby/Tk... isn't as  
easy as falling down a hill. The best part of it is that it comes in  
the Ruby install for Windows XP which I downloaded. The second best  
part is that the Pragmatic guide has a short chapter on it.

Using it is a different story. Yes, I have managed to make some GUIs -  
my standard Tic-Tac-Toe GUI, a file explorer, and a basic text editor.  
But I'm finding it very, very hard to get any more complex primarily  
because I cannot find any definitive information on it. Certainly there  
is the "Use Perl/Tk manuals by doing the following translations" key,  
except that is incorrect for non-basic elements, if they even appear in  
Ruby/Tk. TkOptionMenubutton isn't from Tk, and the 3 TkOption\*'s don't  
seem to fit the 2 Option\*'s in Tk.

I've also gone through some other references like the MacDevCenter Tk  
Primer - states that you need to start your option list with a '\*' or it  
doesn't work. However mine worked fine without it, which I hope means  
that the API has matured since then and not what it could otherwise mean.

This page (email) gives a better overview of Ruby/Tk than most do, but  
again lacks many of the specifics I need to get the API to work.  
[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/138653?help-en](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/138653?help-en)

On a more philosophical note, I am still getting used to Ruby and having  
to script things instead of write-and-compile things, and my question is:

&nbsp;&nbsp;Can Ruby be made explicit instead of implicit?

I can grant you that Java only seems explicit to me because:  
a) I've spent enough time on the basics that I never have to think about  
them anymore, and  
b) that IDEs have had Ctrl+Space working for a long time for it, and  
c) I can always fall back on the somewhat informative Javadoc at  
[java.sun.com](http://java.sun.com).

So are there IDEs for Ruby which provide everything Eclipse provides  
including the things which Ruby's scriptiveness requires, like  
validating variable names are of the correct type and scope and defined  
beforehand? Perhaps also including an IRB - minus the double  
character-per-keypress like the SciTE(?).

I fought long enough with Swing and SWT to make my own basic enclosing  
APIs so that if everything compiled, everything ran (usually even  
correctly). With Ruby that isn't possible, but I'm curious if a better  
paradigm could exist with Ruby and GUIs.

- Short Version -  
My questions are:

0. Which version of Tcl/Tk does Ruby/Tk correspond to? Is there an  
exact translation list showing which elements have Ruby/Tk counterparts,  
or where to find implementations of them? (I haven't tried using  
tkextlib yet)

1. Is there a definitive list of all valid key-value pairs for any or  
all Tk elements? Explicitly listed with the method used to set them,  
eg. .configure() or .command() etc. Hopefully also with one or more  
examples of each and an explanation of what effects they are defined as  
having (say, a Unit Text for each key-value pair?). If the only  
resource are the Tcl/Tk man pages (where elements don't match 1-to-1 for  
Ruby/Tk), have those been effective for others?

1b. A more definitive list of bind event name/combinations would be much  
appreciated, as well as if .command() doesn't exist for an element  
(having problems using it for TkOptionMenubutton), what can be used  
instead on a change - or to bind to the associated TkVariable's change.

2. Has anyone compare/contrasted the existing GUI APIs for Ruby? Do any  
of them have a Visual Studio? Or do any which can easily install on  
Windows XP by a newbie have a Visual Design utility? I'm especially  
interested in one which supports multiple monitors and a variety of  
resolutions.

3. Is there an index page or GUI to definitively show what in the  
ruby\tk subdirectories are runnable demos/samples and which are simply  
included files?

4. Is there a Ruby/Tk homepage or Bugzilla? Several things have shown  
incorrect behaviour, including TkOptionMenubutton where at times the  
menu pops up completely separated from the menu or even the GUI itself.  
I suppose that could be my settings' fault, however I'd still consider  
that a bug if it was.

Thanks for any pointers,

-Chris

---

<div class="post-metadata">

**Author:** ![Justin\_Meyer](https://avatars.discourse-cdn.com/v4/letter/j/c2a13f/32.png) [@Justin\_Meyer](https://rubytalk.org/u/Justin_Meyer)\
**Post date:** [21 December 2005 18:44 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495/2 "2005-12-21T18:44:41Z")

</div>

Hi Chris!

> ... or better GUI APIs for Ruby.  
> (Primary questions at the bottom)

... well, without stepping into that minefield...

> again lacks many of the specifics I need to get the API to work.  
> [http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/138653?help-en](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/138653?help-en)

... and without answering your other questions, is the following link of  
any use to you?

[http://www.jbrowse.com/text/rubytk\_en.html](http://www.jbrowse.com/text/rubytk_en.html)

I'm no good for further details; I just happened to have that link  
laying around 🙂

Cheers,

> **···**
>
> On Thu, 22 Dec 2005, Chris Dagnon wrote:
> 
> --  
> Justin

---

<div class="post-metadata">

**Author:** ![Cam](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@Cam](https://rubytalk.org/u/Cam)\
**Post date:** [13 January 2006 00:39 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495/3 "2006-01-13T00:39:13Z")

</div>

Hi,

> **···**
>
> On 12/21/05, Chris Dagnon \<chris.dagnon@isthmusgroup.com\> wrote:
> 
> > 2. Has anyone compare/contrasted the existing GUI APIs for Ruby? Do any  
> > of them have a Visual Studio? Or do any which can easily install on  
> > Windows XP by a newbie have a Visual Design utility? I'm especially  
> > interested in one which supports multiple monitors and a variety of  
> > resolutions.
> 
> Gtk can be used w/ glade (it works wonderfully for me). I'm not sure  
> if glade is available for windows or not. I'm assuming that Qt  
> Designer also works w/ ruby-qt, although I have never tried it myself.
> 
> Cameron Matheson

---

<div class="post-metadata">

**Author:** ![Chris4](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Chris4](https://rubytalk.org/u/Chris4)\
**Post date:** [21 December 2005 21:28 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495/4 "2005-12-21T21:28:06Z")

</div>

> ... and without answering your other questions, is the following  
> link of any use to you?
> 
> [http://www.jbrowse.com/text/rubytk\_en.html](http://www.jbrowse.com/text/rubytk_en.html)

That is a much better reference than what I've found so far - gives both  
an overview and some details, drill-downs for the different levels of  
info and even a few implementation examples. Still not every detail I  
need (missing TkOptionMenubutton and it's relationship to the whole),  
and it is a lot to digest at once. But at least it is a lot 🙂

Thanks!

-Chris

Justin Meyer wrote:

> **···**
>
> > Hi Chris!
> > 
> > On Thu, 22 Dec 2005, Chris Dagnon wrote:
> > 
> > > ... or better GUI APIs for Ruby.  
> > > (Primary questions at the bottom)
> > 
> > ... well, without stepping into that minefield...
> > 
> > > again lacks many of the specifics I need to get the API to work.  
> > > [http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/138653?help-en](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/138653?help-en)
> > 
> > ... and without answering your other questions, is the following link of  
> > any use to you?
> > 
> > [http://www.jbrowse.com/text/rubytk\_en.html](http://www.jbrowse.com/text/rubytk_en.html)
> > 
> > I'm no good for further details; I just happened to have that link  
> > laying around 🙂
> > 
> > Cheers,

---

<div class="post-metadata">

**Author:** ![Chris4](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Chris4](https://rubytalk.org/u/Chris4)\
**Post date:** [22 December 2005 01:24 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495/5 "2005-12-22T01:24:16Z")

</div>

Now that I think of it, a better question is:

Ruby allows defaults to be stated for all parameters to a method.

Has/Can someone implement Ruby/Tk with \*all\* parameters (configure,  
commands, bind's...) specifically stated with their defaults?

I hope,

-Chris

Chris Dagnon wrote:

> **···**
>
> > > ... and without answering your other questions, is the following  
> > > link of any use to you?
> > > 
> > > [http://www.jbrowse.com/text/rubytk\_en.html](http://www.jbrowse.com/text/rubytk_en.html)
> > 
> > That is a much better reference than what I've found so far - gives both  
> > an overview and some details, drill-downs for the different levels of  
> > info and even a few implementation examples. Still not every detail I  
> > need (missing TkOptionMenubutton and it's relationship to the whole),  
> > and it is a lot to digest at once. But at least it is a lot 🙂
> > 
> > Thanks!
> > 
> > -Chris
> > 
> > Justin Meyer wrote:
> > 
> > > Hi Chris!
> > > 
> > > On Thu, 22 Dec 2005, Chris Dagnon wrote:
> > > 
> > > > ... or better GUI APIs for Ruby.  
> > > > (Primary questions at the bottom)
> > > 
> > > ... well, without stepping into that minefield...
> > > 
> > > > again lacks many of the specifics I need to get the API to work.  
> > > > [http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/138653?help-en](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/138653?help-en)
> > > 
> > > ... and without answering your other questions, is the following link of  
> > > any use to you?
> > > 
> > > [http://www.jbrowse.com/text/rubytk\_en.html](http://www.jbrowse.com/text/rubytk_en.html)
> > > 
> > > I'm no good for further details; I just happened to have that link  
> > > laying around 🙂
> > > 
> > > Cheers,

---

<div class="post-metadata">

**Author:** ![RubyTalk](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@RubyTalk](https://rubytalk.org/u/RubyTalk)\
**Post date:** [12 January 2006 14:31 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495/6 "2006-01-12T14:31:29Z")

</div>

I am working with tk to, and i find it hard to work with the examples i  
find. I think the lack of good docs or examples holds me back from something  
i would like to do. For example I wish i knew about the TkOptionMenubutton.  
I created this code  
this snippet gets the list of files on the hard drive then displays them in  
the menu. u can go back and forth between folders. When you click a file it  
adds it to the text box

[code]

require "tk"  
def MakeMenu (dir)  
a=Array.new  
dirarray=Dir.entries(dir)  
menu1 = TkMenu.new {  
&nbsp;&nbsp;&nbsp;&nbsp;add 'command', {'label'=\>"File", 'command'=\>proc { }}  
&nbsp;&nbsp;&nbsp;&nbsp;dirarray.each { |ax|  
&nbsp;&nbsp;&nbsp;&nbsp;if File.file?(dir+"\\"+ax)  
&nbsp;&nbsp;&nbsp;&nbsp;add 'command', {'label'=\>ax, 'command'=\>proc {  
$Sendfile.value=$Sendfile.value+" "+dir.gsub(' ','|')+"\\"+ax}}  
&nbsp;&nbsp;&nbsp;&nbsp;end  
&nbsp;&nbsp;&nbsp;&nbsp;if File.directory?(dir+"\\"+ax) and ax !="." and  
&nbsp;&nbsp;&nbsp;&nbsp;add 'command', {'label'=\>ax, 'command'=\>proc {MakeMenu(dir+"\\"+ax) }}  
&nbsp;&nbsp;&nbsp;&nbsp;end  
}

}  
#pop up options  
menu1.post TkWinfo.pointerx(root) ,TkWinfo.pointery(root)  
end  
root=TkRoot.new  
usrname = TkVariable.new  
v1 = TkVariable.new  
$set\_to\_read =TkVariable.new  
$email\_array=Array.new  
password = TkVariable.new  
$Current\_id=TkVariable.new  
a=Array.new

radio\_var = TkVariable.new('y')  
$Voice\_use= TkVariable.new(true)

TkFrame.new(root){  
$Sendfile=TkText.new(self).pack "side"=\>"top"  
$Sendfile.width=50  
$Sendfile.height=1  
&nbsp;&nbsp;$options=TkButton.new(self) {text "files"  
&nbsp;&nbsp;command {  
MakeMenu("c:\\")  
}  
}.pack "side"=\>"left"

pack}.grid "column"=\>0,"row"=\>3  
TkFrame.new(root) {  
}.grid "column"=\>5, "row"=\>5, "columnspan"=\>5,"rowspan"=\>5  
Tk.mainloop

[code]

It is not as nice looking as a pull down menu, but its neat. I use it for  
alot of my option menus.

> **···**
>
> On 12/21/05, Chris Dagnon \<chris.dagnon@isthmusgroup.com\> wrote:
> 
> > \> ... and without answering your other questions, is the following  
> > \> link of any use to you?  
> > \>  
> > \> [http://www.jbrowse.com/text/rubytk\_en.html](http://www.jbrowse.com/text/rubytk_en.html)
> > 
> > That is a much better reference than what I've found so far - gives both  
> > an overview and some details, drill-downs for the different levels of  
> > info and even a few implementation examples. Still not every detail I  
> > need (missing TkOptionMenubutton and it's relationship to the whole),  
> > and it is a lot to digest at once. But at least it is a lot 🙂
> > 
> > Thanks!
> > 
> > -Chris
> > 
> > Justin Meyer wrote:  
> > \> Hi Chris!  
> > \>  
> > \> On Thu, 22 Dec 2005, Chris Dagnon wrote:  
> > \>  
> > \>  
> > \>\>... or better GUI APIs for Ruby.  
> > \>\>(Primary questions at the bottom)  
> > \>  
> > \>  
> > \> ... well, without stepping into that minefield...  
> > \>  
> > \>  
> > \>\>again lacks many of the specifics I need to get the API to work.  
> > \>\>  
> > [http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/138653?help-en](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/138653?help-en)  
> > \>  
> > \>  
> > \> ... and without answering your other questions, is the following link of  
> > \> any use to you?  
> > \>  
> > \> [http://www.jbrowse.com/text/rubytk\_en.html](http://www.jbrowse.com/text/rubytk_en.html)  
> > \>  
> > \> I'm no good for further details; I just happened to have that link  
> > \> laying around 🙂  
> > \>  
> > \> Cheers,  
> > \>

---

<div class="post-metadata">

**Author:** ![gregarican](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregarican](https://rubytalk.org/u/gregarican)\
**Post date:** [22 December 2005 14:27 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495/7 "2005-12-22T14:27:48Z")

</div>

Chris Dagnon wrote:

> Has/Can someone implement Ruby/Tk with \*all\* parameters (configure,  
> commands, bind's...) specifically stated with their defaults?

I'm not sure if this type of writeup currently exists. If you look  
through the [http://www.jbrowse.com/text/rubytk\_en.html](http://www.jbrowse.com/text/rubytk_en.html) document you  
still don't get enough information to get your project going? I had a  
couple of projects that I used with Ruby/Tk and found this document to  
help fill in the blanks pretty well. That and perhaps translating a  
Perl/Tk book to Ruby's terms. I know these aren't ideal solutions but  
they should get you maybe 90% of the way there...

---

<div class="post-metadata">

**Author:** ![gregarican](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregarican](https://rubytalk.org/u/gregarican)\
**Post date:** [22 December 2005 14:52 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495/8 "2005-12-22T14:52:53Z")

</div>

Here is a good link that is a Tk reference --\>  
[http://www.tcl.tk/man/tcl8.4/TkCmd/contents.htm](http://www.tcl.tk/man/tcl8.4/TkCmd/contents.htm). Then taking into  
considering how Ruby/Tk prefixes the widget names with a Tk and how  
Ruby treats the various parameters in hash-like fashion you should get  
an idea on how to manipulate things. For example:

myLabel=TkLabel.new(myTkRoot) {text 'myText'  
&nbsp;&nbsp;font 'myFontNameAndSize'  
&nbsp;&nbsp;}.grid(:column=\>1, :row=\>0)

---

<div class="post-metadata">

**Author:** ![Hidetoshi\_NAGAI](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@Hidetoshi\_NAGAI](https://rubytalk.org/u/Hidetoshi_NAGAI)\
**Post date:** [12 January 2006 17:05 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495/9 "2006-01-12T17:05:28Z")

</div>

Message-ID: \<25094bf70601120631j7fcd4f26uab43e3b534912f03@mail.gmail.com\>

> I am working with tk to, and i find it hard to work with the examples i  
> find. I think the lack of good docs or examples holds me back from something  
> i would like to do. For example I wish i knew about the TkOptionMenubutton.  
> I created this code  
> this snippet gets the list of files on the hard drive then displays them in  
> the menu. u can go back and forth between folders. When you click a file it  
> adds it to the text box

Did you see the sample "ext/tk/sample/tkcombobox.rb" on  
the Ruby source tree?  
It may be useful in such case.

> **···**
>
> From: ruby talk \<rubytalk@gmail.com\>  
> Subject: Re: Looking for better Ruby/Tk references...  
> Date: Thu, 12 Jan 2006 23:31:29 +0900  
> --  
> Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

---

<div class="post-metadata">

**Author:** ![J-Van](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@J-Van](https://rubytalk.org/u/J-Van)\
**Post date:** [23 December 2005 04:00 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495/10 "2005-12-23T04:00:15Z")

</div>

I really prefer ruby-gnome2's API to tk's. It makes a whole lot more  
sense to me (and the documentation is a lot better).

Gtk.init  
window = Gtk::Window.new  
label = Gtk::Label.new "my test"  
window \<\< label  
window.show\_all  
Gtk.main\_loop

> **···**
>
> On 12/22/05, gregarican \<greg.kujawa@gmail.com\> wrote:
> 
> > Here is a good link that is a Tk reference --\>  
> > [http://www.tcl.tk/man/tcl8.4/TkCmd/contents.htm\](http://www.tcl.tk/man/tcl8.4/TkCmd/contents.htm%5C). Then taking into  
> > considering how Ruby/Tk prefixes the widget names with a Tk and how  
> > Ruby treats the various parameters in hash-like fashion you should get  
> > an idea on how to manipulate things. For example:
> > 
> > myLabel=TkLabel.new(myTkRoot) {text 'myText'  
> > &nbsp;&nbsp;font 'myFontNameAndSize'  
> > &nbsp;&nbsp;}.grid(:column=\>1, :row=\>0)

---

<div class="post-metadata">

**Author:** ![RubyTalk](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@RubyTalk](https://rubytalk.org/u/RubyTalk)\
**Post date:** [12 January 2006 22:08 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495/11 "2006-01-12T22:08:51Z")

</div>

My example does not do anything so i probably skipped over it. Its like the  
C:\ruby\samples\tk\tkextlib examples.

Becker

> **···**
>
> On 1/12/06, Hidetoshi NAGAI \<nagai@ai.kyutech.ac.jp\> wrote:
> 
> > From: ruby talk \<rubytalk@gmail.com\>  
> > Subject: Re: Looking for better Ruby/Tk references...  
> > Date: Thu, 12 Jan 2006 23:31:29 +0900  
> > Message-ID: \<25094bf70601120631j7fcd4f26uab43e3b534912f03@mail.gmail.com\>  
> > \> I am working with tk to, and i find it hard to work with the examples i  
> > \> find. I think the lack of good docs or examples holds me back from  
> > something  
> > \> i would like to do. For example I wish i knew about the  
> > TkOptionMenubutton.  
> > \> I created this code  
> > \> this snippet gets the list of files on the hard drive then displays them  
> > in  
> > \> the menu. u can go back and forth between folders. When you click a file  
> > it  
> > \> adds it to the text box
> > 
> > Did you see the sample "ext/tk/sample/tkcombobox.rb" on  
> > the Ruby source tree?  
> > It may be useful in such case.  
> > --  
> > Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

---

<div class="post-metadata">

**Author:** ![gregarican](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregarican](https://rubytalk.org/u/gregarican)\
**Post date:** [23 December 2005 13:33 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495/12 "2005-12-23T13:33:03Z")

</div>

Joe Van Dyk wrote:

> I really prefer ruby-gnome2's API to tk's. It makes a whole lot more  
> sense to me (and the documentation is a lot better).

Me too. The fact that Tk comes bundled with the vanilla Ruby  
installation (esp. in terms of the Windows One Click deal) makes it a  
toolkit that folks hit the ground running with. But for me I feel that  
GTK and Qt are a little more object oriented and are a better fit in  
terms of Ruby. Plus like you said, the documentation is a lot better.  
It's just a shame that in terms of Windows implementations the Qt  
library really only works for Cygwin installs. The only way I got it to  
work on non-Cygwin installs was by using a Qt binary fileset published  
for Ruby 1.6.8...

---

<div class="post-metadata">

**Author:** ![tony\_summerfelt](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@tony\_summerfelt](https://rubytalk.org/u/tony_summerfelt)\
**Post date:** [23 December 2005 16:29 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495/13 "2005-12-23T16:29:47Z")

</div>

i've been playing around with gtk the last couple of days. your  
example DOES look cleaner...until you start getting into non-trivial  
gui's...ruby/tk's stays about the same, but gtk's ramps WAY up.

and gtk doesn't play well with ruby2script, i'd rather not have an  
end-user install gtk themselves ('cause you just know they're going to  
get all the environment variables wrong).

while the documentation for gtk seems a lot better, it lacks useful  
examples. i wanted to create a simple text editor similar to the one  
found here: [Ruby/GTK Programming: Text Editor](http://tinyurl.com/cmbrl) that example was too old for the  
recent versions of ruby/gtk

i browsed the relevant documentation for hours (being new to gtk on  
any platform) but coudln't find what i needed to change. granted i've  
not done gui work in ruby before, but it shouldn't have been that hard  
to crank out something as trivial as that.

> **···**
>
> Joe Van Dyk wrote on 12/22/2005 11:00 PM:
> 
> > I really prefer ruby-gnome2's API to tk's. It makes a whole lot more  
> > sense to me (and the documentation is a lot better).
> 
> --  
> [http://home.cogeco.ca/~tsummerfelt1](http://home.cogeco.ca/~tsummerfelt1)  
> telnet://ventedspleen.dyndns.org

---

<div class="post-metadata">

**Author:** ![J-Van](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@J-Van](https://rubytalk.org/u/J-Van)\
**Post date:** [23 December 2005 17:23 UTC](https://rubytalk.org/t/looking-for-better-ruby-tk-references/23495/14 "2005-12-23T17:23:20Z")

</div>

[http://ruby-gnome2.sourceforge.jp/hiki.cgi?Simple+Text+Editor](http://ruby-gnome2.sourceforge.jp/hiki.cgi?Simple+Text+Editor)

> **···**
>
> On 12/23/05, tony summerfelt \<snowzone5@hotmail.com\> wrote:
> 
> > Joe Van Dyk wrote on 12/22/2005 11:00 PM:
> > 
> > \> I really prefer ruby-gnome2's API to tk's. It makes a whole lot more  
> > \> sense to me (and the documentation is a lot better).
> > 
> > i've been playing around with gtk the last couple of days. your  
> > example DOES look cleaner...until you start getting into non-trivial  
> > gui's...ruby/tk's stays about the same, but gtk's ramps WAY up.
> > 
> > and gtk doesn't play well with ruby2script, i'd rather not have an  
> > end-user install gtk themselves ('cause you just know they're going to  
> > get all the environment variables wrong).
> > 
> > while the documentation for gtk seems a lot better, it lacks useful  
> > examples. i wanted to create a simple text editor similar to the one  
> > found here: [Ruby/GTK Programming: Text Editor](http://tinyurl.com/cmbrl) that example was too old for the  
> > recent versions of ruby/gtk
> > 
> > i browsed the relevant documentation for hours (being new to gtk on  
> > any platform) but coudln't find what i needed to change. granted i've  
> > not done gui work in ruby before, but it shouldn't have been that hard  
> > to crank out something as trivial as that.
