GUI With Ruby

Y

Yannick Grams

Just a quick question: I'm sick of using Command Prompt for my little
Ruby programs, and I was wondering what can get me started? I know that
I can use Tk, but that isn't very well documented in the Pickaxe.
Thanks!
 
Y

Yannick Grams

Forgive the double-post, but I was just wondering if there was a Ruby/Tk
book. If not, does anyone know of plans for one?
 
L

Lyle Johnson

Just a quick question: I'm sick of using Command Prompt for my little
Ruby programs, and I was wondering what can get me started? I know that
I can use Tk, but that isn't very well documented in the Pickaxe.
Thanks!

You might also want to take a look at FXRuby:

http://www.fxruby.org/

Hope this helps,

Lyle
 
L

Lyle Johnson

FXRuby looks very interesting: any chance of there being an FXRuby book?

Possibly someday, but not in the immediate future. For the time being,
you'd need to rely on the various online documentation sources at the
FOX home page:

http://www.fox-toolkit.org/

and the FXRuby home page:

http://www.fxruby.org/

There's also some coverage of FXRuby in Hal Fulton's book "The Ruby
Way." (This is a good book to own even if you aren't interested in
FXRuby!)
 
M

M. Edward (Ed) Borasky

Yannick said:
Just a quick question: I'm sick of using Command Prompt for my little
Ruby programs, and I was wondering what can get me started? I know that
I can use Tk, but that isn't very well documented in the Pickaxe.
Thanks!
In my humble opinion, QtRuby is by a wide margin the best documented
Ruby GUI. In addition to Caleb Tennis' book directly concerning QtRuby,
all of the cool Qt gizmos, like Kommander and Korundum, QTDesigner and
all of the Qt documentation itself are available.
 
S

Sharon Phillips

FXRuby looks very interesting: any chance of there being an FXRuby
book?

There's a qtRuby book available (PDF, for US$8.50)
http://www.pragmaticprogrammer.com/titles/ctrubyqt/

Is anyone able to give a quick rundown on which of these toolkits
will work on both Windows and OS X?
It's not that clear from a number of the sites which platforms they
will work on. Some (like qt) seem Linux only. I don't use Linux
<ducks> but a mix os Win and OS X.

Cheers,
Dave
 
M

M. Edward (Ed) Borasky

Sharon said:
There's a qtRuby book available (PDF, for US$8.50)
http://www.pragmaticprogrammer.com/titles/ctrubyqt/

Is anyone able to give a quick rundown on which of these toolkits will
work on both Windows and OS X?
It's not that clear from a number of the sites which platforms they
will work on. Some (like qt) seem Linux only. I don't use Linux
<ducks> but a mix os Win and OS X.

Cheers,
Dave
Qt 4 Ruby works on Windows and Linux for sure. I don't know about Macs,
though. I think most Mac users prefer native Mac GUIs anyhow, and there
is one for Ruby that has a very good reputation. I don't have a Mac, so
I've forgotten the name.
 
S

Sharon Phillips

for macs you can use RubyCocoa.

Thanks, just playing with it now. I like the idea of using interface
builder for building a gui, but I'm not that familiar with XCode -
I've worked my way through the example currency converter, that's
all :)
 
Y

Yannick Grams

I've been playing around with FXRuby, but I find that the tutorial is
more of a quick run-through more than a tutorial. It doesn't explain
things in enough depth. I've tried Googling for one, but to no effect.
Does anybody know of a good tutorial for FXRuby along with a list of
classes and methods?

P.S. I'm quite new to Ruby, and I haven't yet had the need to use a
"gem". Would anyone be able to give me an explanation of exactly how
these "gems" work?
 
R

Raj Sahae

Yannick said:
I've been playing around with FXRuby, but I find that the tutorial is
more of a quick run-through more than a tutorial. It doesn't explain
things in enough depth. I've tried Googling for one, but to no effect.
Does anybody know of a good tutorial for FXRuby along with a list of
classes and methods?
I've been learning FXRuby in the last two months, and you really just
have to dive in.
Pick something you want to make and start doing it. I started off using
foxguib, which helped me learn the way things are supposed to look, but
once you get started, it's much more efficient, and you learn faster, to
code everything yourself.
I also keep the FXRuby and FOX websites open all the time. Having the
API docs on hand is a must.
Once you learn a little bit about how FXRuby works, go bach through the
tutorial, and look at all the example programs.
Things start to make a lot more sense then.

Raj Sahae
 
U

Une Bévue

M. Edward (Ed) Borasky said:
In my humble opinion, QtRuby is by a wide margin the best documented
Ruby GUI.

what about X-platform ?

i want to design over MacOS X and be, as much as possible, X-platform :
win* and *nix.
 
J

John Joyce

You might consider the Dashboard Widgets or Windows Gadgets as a
medium for a Ruby GUI as well, also incorporating Javascript. There
are application stub libraries for OS X, and likely the same for
Windows and Linux. All it means is embedding Ruby into another
language which handles the GUI and Ruby handles the core logic.
Possible, happens often with Python or Perl. But no matter which
approach you take, there is a whole library to learn. Using a web
browser and a web page as the front end locally could be a much
faster approach in terms of prototyping. Ruby should be able to make
any system calls you might make in another language. As for cross-
platform, success depends on how native the app looks and feels. Fact
is with a GUI, each platform is different enough that it isn't
practical to write once and run everywhere, it ends up being like
Java, write once and debug everywhere.
 
J

John Joyce

Actually, Qt has gotten a lot better, and does work on Windows and
OS X and linux with claimed native look and feel.
Your mileage may vary and licensing is not free.
 
C

Caleb Tennis

Qt 4 Ruby works on Windows and Linux for sure. I don't know about
Macs, though. I think most Mac users prefer native Mac GUIs anyhow,
and there is one for Ruby that has a very good reputation. I don't
have a Mac, so I've forgotten the name.

I'm using Qt4 QtRuby on the Mac and Linux wonderfully. I've started
diving into an attempt to build it on Windows, but honestly, using
Windows for software development is very frustrating for me.
However, it certainly is feasible to build and once someone does and
they share their library or routine for building it, we can safely
say it's supported there as well.

Caleb
 
C

Caleb Tennis

I've been learning FXRuby in the last two months, and you really
just have to dive in.

Agreed. FX and FXRuby are indeed great GUI toolkits (this coming
from a Qt guy). I simply started using Qt LONG before I ever picked
up Ruby, so QtRuby was a natural marriage for me.

Your mileage may vary.

Caleb
 
R

Reid Thompson

L

Lyle Johnson

I've been playing around with FXRuby, but I find that the tutorial is
more of a quick run-through more than a tutorial. It doesn't explain
things in enough depth. I've tried Googling for one, but to no effect.
Does anybody know of a good tutorial for FXRuby along with a list of
classes and methods?

The lack of tutorial-style documentation is indeed a problem. As far
as a list of classes and methods, there's some pretty comprehensive
API documentation at the FXRuby web site. You know, the site that I
gave you a link to in my previous e-mail.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

GUI 1
Major desktop GUI apps in Ruby 1
The Ruby GUI debacle 38
Ruby GUI? 7
Desktop GUI apps in Ruby 34
Survey Invitation : Ruby + GUI 4
Future standard GUI library 51
Ruby and windows GUI 5

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top