From: Lyle Johnson Date: 2001-08-15T06:50:48+09:00 Subject: [ruby-talk:19737] Re: General (GUI/license) questions "Ryan Tarpine" wrote in message news:h9ee7.103440$EP6.26449816@news1.rdc2.pa.home.com... > First: Kero commented in the description of his new Ruby Agenda program > "Ruby Agenda is written in Ruby with Tk bindings (which are in the default > Ruby libraries; Tk is likely to be installed on any UNIX system)." This > made me wonder; is it better to use Tk just because it is more common? I > prefer the look of GTK, but (of course) the needs of the users should > outweigh the opinions of the developer. Any comments on this? If Tk by itself will do everything you need, then yes, it's probably your best bet. All of the popular Linux distributions include the Tk runtime libraries as a standard installation option, and Ruby's configure & build process will detect its presence and compile-in support for Tk. Similarly, the standard Ruby installer for Windows (from the Pragmatic Progammers) includes everything you need for Ruby/Tk "out of the box". Strictly speaking, Ruby/Tk is not very well-documented, but it's not too difficult to make the transition from the numerous Tk books & other documentation sources. The problem is that Tk by itself is a little dated. It's missing a lot of popular modern GUI widgets, like tree lists and spreadsheet-like tables. To be sure, if you download & install the Tix extensions for Tk, and then build & install the Ruby extension module that provides an interface to Tix, and whatever other incantations you have to go through, you'll end up with a better-looking GUI. I could probably pull off this installation under Linux, but I'd hate to have to figure out how to make this work under Windows ;) Ruby/GTK's API is very, very nice, but it seems to be broken under Windows in the latest release (and yes, this has been reported). In order to compile Ruby/GTK from the source code on Windows, you need to have first built GTK+ for Windows (and thus have the GTK+ import libraries). I tried doing this and got frustrated by all the dependencies pretty quickly. Which leads to the inevitable conclusion (inevitable, since I'm the one writing this post). FXRuby (http://fxruby.sourceforge.net) works pretty well on both Windows and Linux. The binary installer for Windows (that you can download from the FXRuby home page) is compatible with the latest Ruby installer for Windows and has everything you need to get started. For Linux (or other Unix platforms) you'll need to first download, build and install FOX (http://www.cfdrc.com/FOX/fox.html). You're not going to find FOX on any of the standard Linux distributions (not yet, anyways), but it's pretty straightforward to compile it yourself.