What do you use with Ruby for GUI programming and why?

Is there a push to one toolkit or the other?

···

--
Robert

Just yesterday I posted on this list because of a spreadsheet that had a
quite good comparison between the various toolkits available for Ruby
(see http://www.ruby-forum.com/topic/217287 ), but sadly, that
spreadsheet is still lost...

Vale,
Marvin

···

Am 11.03.2011 03:30, schrieb Robert:

Is there a push to one toolkit or the other?

--
Robert

I use Shoes. I'm biased; I'm one of the maintainers.

JRuby plus either Swing or SWT (possibly using one of the Ruby
wrappers/DSLs/APIs around them) is really hard to beat. Nothing to
compile, works consistently across platforms. You ship Ruby code alone
(Swing) or Ruby plus a couple pre-built backends (SWT) and you're
done.

The RedCar editor (redcareditor.com) is a great example of a solid,
awesome app written with JRuby and SWT, and there's a number of other
commercial users of JRuby + SWT or Swing.

- Charlie

···

On Thu, Mar 10, 2011 at 8:30 PM, Robert <sigzero@gmail.com> wrote:

Is there a push to one toolkit or the other?

Robert wrote in post #986825:

Is there a push to one toolkit or the other?

I've used Tk for a long while now, and while I've found it's sometimes
hard to install, I've found it to work very seamlessly with ruby. I
wouldn't suggest jumping into graphics if you don't already know how to
do basic programming, but if your at that point then I would highly
recommend Tk. You'll probably want to find a tutorial on how to install
it on your system (you may need to install Tcl/Tk from
http://www.activestate.com/) look at this guide for all your graphic
needs: http://www.tutorialspoint.com/ruby/ruby_tk_guide.htm

Tk is cross-platform and pre-installed in a lot of installers for Ruby.
I've found it a lot easier to learn then other toolkits...

···

--
Posted via http://www.ruby-forum.com/.

I myself still use ruby-gtk / ruby-gnome.

What got me into it is actually the nice documentation and the many
examples.

I am a slow learner and I absolutely need documentation.

What ruby-gtk would need would be more ruby guys with good knowledge in
C. I would have the time to help but unfortunately my C knowledge just
is not good enough to really send in patches and help the maintainers.
:frowning:

···

--
Posted via http://www.ruby-forum.com/.

Is there a push to one toolkit or the other?

Here's one comparison of toolkits:
http://en.wikibooks.org/wiki/Ruby_Programming/GUI_Toolkit_Modules

I currently just use straight swing wrapper with jruby (wrapped to be
ruby friendlier). Unfortunately there's no clear winner, AFAIK.
-r

···

--
Posted via http://www.ruby-forum.com/.

Surprised no one has mentioned Fxruby and Wxruby.

there is also a frontend fui builder for fxruby called fxoGUIb written
by henon (it uses fxruby bindings).

I use it with 1.8.7 (get some error codes appear that don't come up with
1.8.6 but doesn't stop it running).

pro's

cross platform but you have to change the widget placement sometimes
when using foxGUIb but that's not too bad.

you can create you're GUI really fast and then subclass you're event
handling code behind it to make it run.

con's

no longer in developement (fxruby or foxGUIb but are MIT or GPL so
anyone could take these up and run with them again).

can be a bugger to get foxGUIb going when you start out.

not tried using either on a mac.

Wxruby not used but think it'd be similar to fxruby.

HTH

dave.

···

--
Posted via http://www.ruby-forum.com/.

hi -

  i also use ruby-gtk2, and i'm generally very happy with it. it uses
native widgets, and gives a 'natural' look to your apps. there's a bit
of a learning curve as with any toolkit, but once you get the hang of
it, it works really well.
  i agree with the earlier post that the documentation is probably the
biggest benefit, and there's the gnome2 part of this forum which is
extremely helpful. it's also in active development which is a big plus!

  there's also the glade ui designer, which i haven't used, but is
supposed to make gui programming with gtk easier...

-j

···

--
Posted via http://www.ruby-forum.com/.

Hi

Formerly I used Tk but now, I am using ruby-gtk2 because i found it very
versatile and because it has a good documentation. I also like its
object oriented design.
I use it on windows (XP, 7) and linux (Fedora) without any change in my
ruby 1.8.7 code.

Michel.

For me I did not like Tk, neither the look nor the documentation.

I used FXRuby for some time but FXRuby died when FOX died.

Basically I had a choice between qtruby and ruby-gtk/gnome and although
I think Qt4 is now better than Gtk2, the documentation of ruby-gtk was
better so I started to use ruby-gtk.

···

--
Posted via http://www.ruby-forum.com/.

Robert wrote in post #986825:

Is there a push to one toolkit or the other?

I use Shoes for little application :
* on windows, run very quikly : 1/2s for main window ready
* test on ubuntu generaly work directly

The main issues is with Treading with 1.9 : i use a queue
in output of thread, and read the queue periodicly qith an every()

···

--
Posted via http://www.ruby-forum.com/.

I use Shoes. I'm biased; I'm one of the maintainers.

That's interesting. I rather thought that you had to think of Shoes as a seperate language, almost. Do you ever find that the Shoes syntax ever gets in the way of writing good old-fashioned Ruby code? Or is that a stupid thing to say?

I fell in love with Shoes when _Why produced it, but I was seduced away to try and learn a "proper" toolkit (GTK, in fact). What would you say the limits of Shoes were?

FWIW, I'm using FxRuby with no real problems. It's been easy to install and limited testing shows it to be cross-platform code-compatible (tested on OS X Snow Leopard and Windows 7). Haven't tried it on my Ubuntu system yet, but 'real soon now'.
The fact that there's a book in support of it was admittedly a factor -- I'm still learning Ruby and the associated packages...

cheers,
Bill

···

On Mar 11, 2011, at 8:25 AM, Quintus wrote:

Am 11.03.2011 03:30, schrieb Robert:

Is there a push to one toolkit or the other?

--
Robert

Just yesterday I posted on this list because of a spreadsheet that had a
quite good comparison between the various toolkits available for Ruby
(see http://www.ruby-forum.com/topic/217287 ), but sadly, that
spreadsheet is still lost...

Vale,
Marvin

Roger, is that wrapper input_form?

A few months ago I learned of Monkeybars and had planned to learn it,
but I haven't gotten around to it. I'm still wondering what the
advantages of it (or other wrappers) over raw Swing are.

···

On Sat, Mar 12, 2011 at 7:59 PM, Roger Pack <rogerpack2005@gmail.com> wrote:

Is there a push to one toolkit or the other?

Here's one comparison of toolkits:
http://en.wikibooks.org/wiki/Ruby_Programming/GUI_Toolkit_Modules

I currently just use straight swing wrapper with jruby (wrapped to be
ruby friendlier). Unfortunately there's no clear winner, AFAIK.

I currently just use straight swing wrapper with jruby (wrapped to be
ruby friendlier). Unfortunately there's no clear winner, AFAIK.

If you leave cross-platform out of the question (which wasn't originally part of it AFAIK), MacRuby and its friends produce amazing results for OS X!

Plus: You can take advantage of the Interface Designer and all the other OS goodies. Hard to beat.

*ducks the apple fanboy flaming*
k

I usually use wxRuby when coding GUIs and it's a wonderful tookit (it
comes with PLENTY of examples and quite good documentation), but on my
current machine it just doesn't run. I get plenty of segfaults with it.
Hopefully this will be resolved soon, because otherwise I have to recode
all the programs I've written with it...

Vale,
Marvin

···

Am 14.03.2011 09:12, schrieb Dave Lilley:

Wxruby not used but think it'd be similar to fxruby.

What is the reason you switched from TK? Did you also feel that tk did not have enough features (and documentation)?

I was using Tk for a while, but those were the reason I stopped. I might give something else listed in this thread a
jab.

Simon

···

On Tue, Mar 15, 2011 at 02:28:06AM +0900, Michel wrote:

Hi

Formerly I used Tk but now, I am using ruby-gtk2 because i found it very
versatile and because it has a good documentation. I also like its
object oriented design.
I use it on windows (XP, 7) and linux (Fedora) without any change in my
ruby 1.8.7 code.

Michel.

<shameless_plug>
freightrain -> http://github.com/bolthar/freightrain is an MVC framework over
GTK+ and other toolkits. It makes the job much easier than having to deal
directly with ruby/GTK... give it a try :slight_smile:
</shameless_plug>

Andrea

···

On Friday, March 11, 2011 05:15:19 pm Shadowfirebird wrote:

> I use Shoes. I'm biased; I'm one of the maintainers.

That's interesting. I rather thought that you had to think of Shoes as a
seperate language, almost. Do you ever find that the Shoes syntax ever
gets in the way of writing good old-fashioned Ruby code? Or is that a
stupid thing to say?

I fell in love with Shoes when _Why produced it, but I was seduced away to
try and learn a "proper" toolkit (GTK, in fact). What would you say the
limits of Shoes were?

Or is that a stupid thing to say?

Shoes is just Ruby, with a lot of library on top. That said, the way it's
currently distributed is almost as a separate language, so your intuition is
almost right. _why described it as a 'toolkit.'

As far as the limitations of Shoes:

- gems with native extensions are Right Out. Unless you want to make your
own pair of shoes.
- Shoes is currently Ruby 1.9.1, so it's missing a lot of 1.9.2 goodies.
- Packaging is still a bit borked on OSX.

That said, we're looking to address all of this. One aspect is the
green_shoes project, which you can find at http://green.shoesrb.com/ . It's
true, the docs are a bit sparse, and it doesn't really work on OSX yet. But
it's a mostly-compatible Shoes that's written in all Ruby.

Another thing: I haven't talked about this much publicly yet, but I'm in the
process of turning Red Shoes (the classic, _why shoes) into a regular old
Gem. This means you'd be able to use it with your regular Ruby, and all of
your other gems.

Anyway, Shoes as a project is still strong and kicking, and we're working to
address remaining issues. :smiley: