Ruby GUI with IDE

sender: "M. Edward (Ed) Borasky" date: "Sun, Nov 12, 2006 at 07:38:05AM +0900" <<<EOQ

AliasX Neo wrote:
>David Vallner wrote:
>
>>AliasX Neo wrote:
>>
>>>You lost me there with the combination of ActiveState tools.
>>>
>>>
>>ActiveState Komodo supports targetting Ruby/Tk from its GUI builder, it
>>seems.
>>
>>It's just that... Well... Ugh, Tk. <ducking yet faster>
>>
>>David Vallner
>>
>
>I wasn't aware it has a GUI builder. I have ActiveState Komodo 3.5
>installed on my computer right now. Is there some extension I need?

It's there on 3.5 as well, but you need the Professional version.
You can download the trial of the professional version and give it
a spin :slight_smile: It feels nice :slight_smile:

Good luck,
Alex

http://ezgtk.rubyforge.org/ might be worth a look

martin

···

On 11/14/06, Richard Conroy <richard.conroy@gmail.com> wrote:

Basically, I like the idea of making simple UIs in Ruby for test tools,
and software that you don't sell.

Richard Conroy wrote:

AliasX Neo wrote:
> Windows users, what do you do to develop GUI's for Ruby?
>

Handcode / use Python.

I am curious, but is handcoding Ruby UIs in whatever (Tk by default)
a significant amount of work?

I honestly haven't really tried. Gtk and Tk sort of put me off, since
the former seems to lack data binding, and the latter is just weird - I
could never get the layout right, and those pretty much the only stable
crossplatform GUI toolkits available.

Consider doing the equivalent in Java Swing as a frame of reference?
(painful but do-able).

However, from having used the pre-rewrite wxRuby bindings, it was fairly
doable. Blocks-as-callbacks usually seem to hide most of the ugliness
you'd see futzing around with Gtk callbacks in C, and most of the
frameworks seem to follow roughly the same paradigm of nesting
horizontal and vertical layouts / splitters, as opposed to Swing's
layout managers. (Of which only the simple ones were meant for human
consumption anyway, the messier SpringLayout was to be generated by a
form designer since that's where a UI designer would more probably want
to use constraints between elements.)

Basically, I like the idea of making simple UIs in Ruby for test tools,
and software that you don't sell.

Maybe Tk, since it's part of the stdlib, even if it has a weird approach
to scrolling, and personally I'd go with Wx if the rewrite gets Stable
Enough. On Windows, Gtk still looks disappointing, has to be installed,
and overall tries to pretend there's a Linux underneath - installing the
pre-rewrite Wx was a matter of dropping the wxruby.so into
C:\Ruby\lib\ruby\site_ruby\1.8\i386-msvcrt, which scores the people
major points in the Just Works category.

Also, most of Gtk example code is in C, and their object-oriented C API
is... byzantine to say the least, and I find it hard to mentally map
into Ruby. This is less of a problem for a C++ based framework. Since Tk
bindings almost always seem to involve writing Tcl with an alternate
syntax, there's another double-edged sword there. Code examples are
easily translated, but at least to me, they look out of place in Ruby.

Qt seems more designed to play nicely with the form designer. For larger
projects, that's a Good Thing - you can happily let a dedicated UI
designer take care of that and the programmers can concentrate on the
controlling code. The downside is that while it could be possible to
handcode it easily, at least I couldn't find much exhaustive online
material as to how.

David Vallner

···

On 11/11/06, David Vallner <david@vallner.net> wrote:

I was also very pleased to see it, but it is a little buggy. Save
often lest you crash.

Les

···

On 11/15/06, Michael Vondung <mvondung@gmail.com> wrote:

On Sun, 12 Nov 2006 18:05:26 +0900, David Roberts wrote:

> foxGUIb (http://fox-tool.rubyforge.org/\) is a possible option,
> but is mainly a gui for building guis, not an IDE in its
> own right.

Oh-ha! I didn't know about this one! And it works -- pretty much what I
have been waiting for a (long) while now.

--
Man's unfailing capacity to believe what he prefers to be true rather
than what the evidence shows to be likely and possible has always
astounded me. We long for a caring Universe which will save us from
our childish mistakes, and in the face of mountains of evidence to the
contrary we will pin all our hopes on the slimmest of doubts. God has
not been proven not to exist, therefore he must exist.

- Prokhor Zakharov

David Vallner wrote:

M. Edward (Ed) Borasky wrote:
  

David Vallner wrote:
    

AliasX Neo wrote:

Windows users, what do you do to develop GUI's for Ruby?

Handcode / use Python.

David Vallner

Use commercial Microsoft tools, just like they teach you about in the
Microsoft Certification courses

<ducking>

You're evil. So very evil.

(And unfortunately right. MSVS+VB6 by far holds the record in
approachable RAD GUIs. Of abysmal quality, but oh, the quantity and
sheer scope of people making them.)

David Vallner
  

But a QTDesigner GUI is a lot prettier than the ones I've seen come out of VBA, Even a Tcl/Tk GUI looks better than most of the VBA default dialog boxes.

···

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.

I think Visual Studio 2005 is great. Controls on forms are pixel
positioned, but you can anchor any side so that they can be resized,
and it's a quick thing to set minimum and maximum sizes. If you anchor
opposite sides, the control resizes itself as its container resizes.
It's very easy to design and seems to work well. I could never get
used to the pain of the X-Windows way, with inserting all kinds of
sizers and spacers that don't seem to need to be there. What is the
advantage over the MS way?

···

On 11/12/06, David Vallner <david@vallner.net> wrote:

M. Edward (Ed) Borasky wrote:
> David Vallner wrote:
>> AliasX Neo wrote:
>>
>>> Windows users, what do you do to develop GUI's for Ruby?
>>>
>>
>> Handcode / use Python.
>>
>> David Vallner
>>
> Use commercial Microsoft tools, just like they teach you about in the
> Microsoft Certification courses
>
> <ducking>
>

You're evil. So very evil.

(And unfortunately right. MSVS+VB6 by far holds the record in
approachable RAD GUIs. Of abysmal quality, but oh, the quantity and
sheer scope of people making them.)

--
Man's unfailing capacity to believe what he prefers to be true rather
than what the evidence shows to be likely and possible has always
astounded me. We long for a caring Universe which will save us from
our childish mistakes, and in the face of mountains of evidence to the
contrary we will pin all our hopes on the slimmest of doubts. God has
not been proven not to exist, therefore he must exist.

- Prokhor Zakharov

There are some wiki pages you might want to overhaul or add to:

http://en.wikibooks.org/wiki/Ruby_programming_language
http://www.trug.ca/Ruby_GUI_Toolkits/archive_of_crap

..I think I have seen more.

Then the next time someone asks this question, everyone should just go
to the best wiki page, add their comments there, and point the poster
to the page.

Can we agree on a good place to put such info? Perhaps a page at Ruby Garden?

Les

···

On 11/12/06, Robert Dober <robert.dober@gmail.com> wrote:

On 11/11/06, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:<snipping>

>
> <ducking>

It has been a pleasure reading your posts, RIP :wink:

But I agree with what you have said before (this sentence can be applied
once only!).

There should be a FAQ, and yes I volunteer to work on it!!!!, and if there
was a FAQ this should be one of the leading issues.

But maybe there is a FAQ? Never seen any ref to it, though.

Cheers
Robert

--
> M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
> http://borasky-research.blogspot.com/
>
> If God had meant for carrots to be eaten cooked, He would have given
> rabbits fire.
>

--
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man.

- George Bernard Shaw

>
> > foxGUIb (http://fox-tool.rubyforge.org/\) is a possible option,
> > but is mainly a gui for building guis, not an IDE in its
> > own right.
>
> Oh-ha! I didn't know about this one! And it works -- pretty much what I
> have been waiting for a (long) while now.

i am very pleased, that my project is helpful for you :wink:

I was also very pleased to see it, but it is a little buggy. Save
often lest you crash.

Les

that's right, there are some bugs, but at least it saves a
*_failsave.rbin file when crashing, so you won't loose your work :wink:
I'd be very happy if anyone has time and wants to support the project
foxGUIb (fixing bugs and/or refactoring ...). I myself have *very*
little time for it due to my study, work and the kids.

-- meinrad

···

On 11/15/06, Leslie Viljoen <leslieviljoen@gmail.com> wrote:

On 11/15/06, Michael Vondung <mvondung@gmail.com> wrote:
> On Sun, 12 Nov 2006 18:05:26 +0900, David Roberts wrote:

M. Edward (Ed) Borasky wrote:

But a QTDesigner GUI is a lot prettier than the ones I've seen come out
of VBA, Even a Tcl/Tk GUI looks better than most of the VBA default
dialog boxes.

Well, I never said they looked pretty. Just did the job, for given
values of the term, for amazing numbers of people. (Who coincidentally
weren't their own users. Explains a lot.)

VBA = managers. Managers = control freaks. I'm forced to use a hacked
version of Windows XP on my work laptop. Nothing says "I hate my users"
like an always-on-top, unmovable popup asking you if you want to reboot
your computer for updates now or in 30 minutes. With pixel-positioned
controls, unresizable, taking up 1/9 of the screen in the middle.

(The flamewar on whether to empower users that are Unqualified and Proud
Of It to be able to create things to be imposed on others is old, very
old. The fact that given any number of assistive tools and sensible
defaults they will do it in the worst way possible anyway well-known :P)

David Vallner

Leslie Viljoen wrote:

What is the
advantage over the MS way?

Spacers put the user in control.

David Vallner

Oh if ONLY I'd known about that a few months ago!
There's nothing like putting the final touches on a hard-won dialog
and then losing it all. I was so annoyed I hand-coded the rest!

Still, I am grateful for foxGUIb and appreciate the work you put into
it. It can be a real time saver.

Les

···

On 11/15/06, Meinrad Recheis <meinrad.recheis@gmail.com> wrote:

On 11/15/06, Leslie Viljoen <leslieviljoen@gmail.com> wrote:
> On 11/15/06, Michael Vondung <mvondung@gmail.com> wrote:
> > On Sun, 12 Nov 2006 18:05:26 +0900, David Roberts wrote:
> >
> > > foxGUIb (http://fox-tool.rubyforge.org/\) is a possible option,
> > > but is mainly a gui for building guis, not an IDE in its
> > > own right.
> >
> > Oh-ha! I didn't know about this one! And it works -- pretty much what I
> > have been waiting for a (long) while now.

i am very pleased, that my project is helpful for you :wink:
>
> I was also very pleased to see it, but it is a little buggy. Save
> often lest you crash.
>
> Les
>
that's right, there are some bugs, but at least it saves a
*_failsave.rbin file when crashing, so you won't loose your work :wink:
I'd be very happy if anyone has time and wants to support the project
foxGUIb (fixing bugs and/or refactoring ...). I myself have *very*
little time for it due to my study, work and the kids.

--
Man's unfailing capacity to believe what he prefers to be true rather
than what the evidence shows to be likely and possible has always
astounded me. We long for a caring Universe which will save us from
our childish mistakes, and in the face of mountains of evidence to the
contrary we will pin all our hopes on the slimmest of doubts. God has
not been proven not to exist, therefore he must exist.

- Prokhor Zakharov

In what way? A spacer on one side seems to create exactly the same
effect as an anchor on the other side of a control - except with the
anchor there's only one control, with the spacer there are two. Am I
missing something?

···

On 11/12/06, David Vallner <david@vallner.net> wrote:

Leslie Viljoen wrote:
> What is the
> advantage over the MS way?
>

Spacers put the user in control.

--
Man's unfailing capacity to believe what he prefers to be true rather
than what the evidence shows to be likely and possible has always
astounded me. We long for a caring Universe which will save us from
our childish mistakes, and in the face of mountains of evidence to the
contrary we will pin all our hopes on the slimmest of doubts. God has
not been proven not to exist, therefore he must exist.

- Prokhor Zakharov

Leslie Viljoen wrote:

Leslie Viljoen wrote:
> What is the
> advantage over the MS way?
>

Spacers put the user in control.

In what way? A spacer on one side seems to create exactly the same
effect as an anchor on the other side of a control - except with the
anchor there's only one control, with the spacer there are two. Am I
missing something?

Unless I have my terminology wrong, a spacer can be dragged around to
change the place where the GUI is partitioned. If you dock a control to
a screen edge, it will at best resize of its own will between the
constraints you specify in the IDE.

Also, for high-grade GUIs, mere resizable widget layouting is a very
primitive technique. Using floating tool windows that can be docked
(also by default) to an arbitrary screen side gives a "power user" yet
more flexibility to arrange a UI as he wants: IDEs like IntelliJ IDEA
and KDevelop follow this, also the tool windows in jEdit. And if you
make the most common panels hide and unhide using keyboard shortcuts,
the result is a GUI that will both offer a lot of information when
necessary, and is easily uncluttered when you need to concentrate on the
primary task.

VS and its form designer let you make a GUI quickly and easily. But none
of the "easy" methods it provides intersect with what I personally
consider as features of a "very good GUI".

David Vallner

···

On 11/12/06, David Vallner <david@vallner.net> wrote: