C
Chris Dagnon
... or better GUI APIs for Ruby.
(Primary questions at the bottom)
- Long Version/Background -
Hello all and sorry for the disruption, but I'm mid-stream of learning
Ruby and I have some GUIs I want to write. However Ruby/Tk... isn't as
easy as falling down a hill. The best part of it is that it comes in
the Ruby install for Windows XP which I downloaded. The second best
part is that the Pragmatic guide has a short chapter on it.
Using it is a different story. Yes, I have managed to make some GUIs -
my standard Tic-Tac-Toe GUI, a file explorer, and a basic text editor.
But I'm finding it very, very hard to get any more complex primarily
because I cannot find any definitive information on it. Certainly there
is the "Use Perl/Tk manuals by doing the following translations" key,
except that is incorrect for non-basic elements, if they even appear in
Ruby/Tk. TkOptionMenubutton isn't from Tk, and the 3 TkOption*'s don't
seem to fit the 2 Option*'s in Tk.
I've also gone through some other references like the MacDevCenter Tk
Primer - states that you need to start your option list with a '*' or it
doesn't work. However mine worked fine without it, which I hope means
that the API has matured since then and not what it could otherwise mean.
This page (email) gives a better overview of Ruby/Tk than most do, but
again lacks many of the specifics I need to get the API to work.
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/138653?help-en
On a more philosophical note, I am still getting used to Ruby and having
to script things instead of write-and-compile things, and my question is:
Can Ruby be made explicit instead of implicit?
I can grant you that Java only seems explicit to me because:
a) I've spent enough time on the basics that I never have to think about
them anymore, and
b) that IDEs have had Ctrl+Space working for a long time for it, and
c) I can always fall back on the somewhat informative Javadoc at
java.sun.com.
So are there IDEs for Ruby which provide everything Eclipse provides
including the things which Ruby's scriptiveness requires, like
validating variable names are of the correct type and scope and defined
beforehand? Perhaps also including an IRB - minus the double
character-per-keypress like the SciTE(?).
I fought long enough with Swing and SWT to make my own basic enclosing
APIs so that if everything compiled, everything ran (usually even
correctly). With Ruby that isn't possible, but I'm curious if a better
paradigm could exist with Ruby and GUIs.
- Short Version -
My questions are:
0. Which version of Tcl/Tk does Ruby/Tk correspond to? Is there an
exact translation list showing which elements have Ruby/Tk counterparts,
or where to find implementations of them? (I haven't tried using
tkextlib yet)
1. Is there a definitive list of all valid key-value pairs for any or
all Tk elements? Explicitly listed with the method used to set them,
eg. .configure() or .command() etc. Hopefully also with one or more
examples of each and an explanation of what effects they are defined as
having (say, a Unit Text for each key-value pair?). If the only
resource are the Tcl/Tk man pages (where elements don't match 1-to-1 for
Ruby/Tk), have those been effective for others?
1b. A more definitive list of bind event name/combinations would be much
appreciated, as well as if .command() doesn't exist for an element
(having problems using it for TkOptionMenubutton), what can be used
instead on a change - or to bind to the associated TkVariable's change.
2. Has anyone compare/contrasted the existing GUI APIs for Ruby? Do any
of them have a Visual Studio? Or do any which can easily install on
Windows XP by a newbie have a Visual Design utility? I'm especially
interested in one which supports multiple monitors and a variety of
resolutions.
3. Is there an index page or GUI to definitively show what in the
ruby\tk subdirectories are runnable demos/samples and which are simply
included files?
4. Is there a Ruby/Tk homepage or Bugzilla? Several things have shown
incorrect behaviour, including TkOptionMenubutton where at times the
menu pops up completely separated from the menu or even the GUI itself.
I suppose that could be my settings' fault, however I'd still consider
that a bug if it was.
Thanks for any pointers,
-Chris
(Primary questions at the bottom)
- Long Version/Background -
Hello all and sorry for the disruption, but I'm mid-stream of learning
Ruby and I have some GUIs I want to write. However Ruby/Tk... isn't as
easy as falling down a hill. The best part of it is that it comes in
the Ruby install for Windows XP which I downloaded. The second best
part is that the Pragmatic guide has a short chapter on it.
Using it is a different story. Yes, I have managed to make some GUIs -
my standard Tic-Tac-Toe GUI, a file explorer, and a basic text editor.
But I'm finding it very, very hard to get any more complex primarily
because I cannot find any definitive information on it. Certainly there
is the "Use Perl/Tk manuals by doing the following translations" key,
except that is incorrect for non-basic elements, if they even appear in
Ruby/Tk. TkOptionMenubutton isn't from Tk, and the 3 TkOption*'s don't
seem to fit the 2 Option*'s in Tk.
I've also gone through some other references like the MacDevCenter Tk
Primer - states that you need to start your option list with a '*' or it
doesn't work. However mine worked fine without it, which I hope means
that the API has matured since then and not what it could otherwise mean.
This page (email) gives a better overview of Ruby/Tk than most do, but
again lacks many of the specifics I need to get the API to work.
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/138653?help-en
On a more philosophical note, I am still getting used to Ruby and having
to script things instead of write-and-compile things, and my question is:
Can Ruby be made explicit instead of implicit?
I can grant you that Java only seems explicit to me because:
a) I've spent enough time on the basics that I never have to think about
them anymore, and
b) that IDEs have had Ctrl+Space working for a long time for it, and
c) I can always fall back on the somewhat informative Javadoc at
java.sun.com.
So are there IDEs for Ruby which provide everything Eclipse provides
including the things which Ruby's scriptiveness requires, like
validating variable names are of the correct type and scope and defined
beforehand? Perhaps also including an IRB - minus the double
character-per-keypress like the SciTE(?).
I fought long enough with Swing and SWT to make my own basic enclosing
APIs so that if everything compiled, everything ran (usually even
correctly). With Ruby that isn't possible, but I'm curious if a better
paradigm could exist with Ruby and GUIs.
- Short Version -
My questions are:
0. Which version of Tcl/Tk does Ruby/Tk correspond to? Is there an
exact translation list showing which elements have Ruby/Tk counterparts,
or where to find implementations of them? (I haven't tried using
tkextlib yet)
1. Is there a definitive list of all valid key-value pairs for any or
all Tk elements? Explicitly listed with the method used to set them,
eg. .configure() or .command() etc. Hopefully also with one or more
examples of each and an explanation of what effects they are defined as
having (say, a Unit Text for each key-value pair?). If the only
resource are the Tcl/Tk man pages (where elements don't match 1-to-1 for
Ruby/Tk), have those been effective for others?
1b. A more definitive list of bind event name/combinations would be much
appreciated, as well as if .command() doesn't exist for an element
(having problems using it for TkOptionMenubutton), what can be used
instead on a change - or to bind to the associated TkVariable's change.
2. Has anyone compare/contrasted the existing GUI APIs for Ruby? Do any
of them have a Visual Studio? Or do any which can easily install on
Windows XP by a newbie have a Visual Design utility? I'm especially
interested in one which supports multiple monitors and a variety of
resolutions.
3. Is there an index page or GUI to definitively show what in the
ruby\tk subdirectories are runnable demos/samples and which are simply
included files?
4. Is there a Ruby/Tk homepage or Bugzilla? Several things have shown
incorrect behaviour, including TkOptionMenubutton where at times the
menu pops up completely separated from the menu or even the GUI itself.
I suppose that could be my settings' fault, however I'd still consider
that a bug if it was.
Thanks for any pointers,
-Chris