Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Ruby (http://www.programmingforums.org/forum63.html)
-   -   Ruby Good With Gui? (http://www.programmingforums.org/showthread.php?t=10891)

infinite05 Jul 30th, 2006 8:15 PM

Ruby Good With Gui?
 
I was wondering if Ruby is good for creating programs which use Gui. Because im willing to learn this language but I would like to use Ruby to create programs which go to the internet and automaticly do things for you when you click a button.

Arevos Jul 31st, 2006 8:42 AM

Ruby works with several poopular cross-platform GUI toolkits, including wxWidgets, Qt and GTK. It lags a little behind Python, though (a language similar and often compared to Ruby). wxRuby is only at version 0.6.0, and QtRuby only supports Qt 3 (whilst PyQt now supports Qt 4).

GTK seems the most viable option for a Ruby GUI.

Jessehk Jul 31st, 2006 7:50 PM

There is also FxRuby which uses the Fox toolkit, but I haven't looked into it.
Ruby's use of gtk is pretty nice, e.g.

:

require 'gtk2'

Gtk.init

button = Gtk::Button.new("Hello, world!")
window = Gtk::Window.new

window.signal_connect("destroy") { Gtk.main_quit }
window.border_width = 10
window.add button
window.show_all

Gtk.main


but if you are writing a GUI application, I would still recommend Python over Ruby.

infinite05 Jul 31st, 2006 9:51 PM

Yeah, im going to learn Python now because I dont know how to use Rubyscript2exe but I do know how to use py2exe.


All times are GMT -5. The time now is 12:44 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC