I need to create an app that will use Ruby/TK and Ruby/MySql.
It will be a standalone pc app...
I'm going thru the "Pickaxe" book...and it contains a chapter on Tk -
but I'm looking for a good reference that covers Ruby and Tk in greater
detail. I'll be doing a lot of mathematical curve drawing [ie, plotting
some statistical functions].
The "Pickaxe" doesn't cover databases...I'm particularly interested in
using MySQL with Ruby.
I need to create an app that will use Ruby/TK and Ruby/MySql.
It will be a standalone pc app...
I'm going thru the "Pickaxe" book...and it contains a chapter on Tk -
but I'm looking for a good reference that covers Ruby and Tk in greater
detail. I'll be doing a lot of mathematical curve drawing [ie, plotting
some statistical functions].
The "Pickaxe" doesn't cover databases...I'm particularly interested in
using MySQL with Ruby.
I prefer textbooks...
Will someone make a recommendation.
THX,
Pat
I can't help you on MySQL -- I'm a PostgreSQL fanatic. As far as Ruby
Tk, the recommendation in the Pickaxe book is to pick up "Mastering
Perl/Tk" and just convert to Ruby. You'll also find lots of examples in
Tcl when you load Tcl and Tk to port to Ruby.
That said, unless you need Windows support, I'd recommend QTRuby. The
documentation is much better than what's available for *Ruby* Tk,
especially if you consider the Pragmatic Programmers' "Friday" series
PDF book.
I think the QT widgets look prettier than the Tk widgets as well.
[1] Sorry if that sounds egotistical, it's just that it explains the
format, and from where I dug out the info. If you really want
the url it's http://www.eng.cse.dmu.ac.uk/~hgs/ruby/
I'm going thru the "Pickaxe" book...and it contains a chapter on Tk -
On "Pickaxe" book, "command" option of TkScrollbar and yscrollcommand
option of the scrolled widget are used for scrolling.
Of course, that has no problem except bothering you.
However, Ruby/Tk supports "xscrolbar" method and "yscrollbar" method
for scrollable widgets. Those methods make such relationship between
a widget and a scrollbar.
From: Patrick Lynch <lynchnco@patmedia.net>
Subject: Looking for reference for Ruby/Tk and Ruby/MySQL
Date: Fri, 15 Sep 2006 09:08:06 +0900
---------------------------------------------------------------------
>
v
-----<use "yscrollbar" method>-----------------------------------------
list_w = TkListbox.new(frame, 'selectmode'=>'single')
list_w.yscrollbar(TkScrollbar.new(frame).pack('side'=>'left', 'fill'=>'y'))
---------------------------------------------------------------------
If you want to scroll simultaneously some listboxes by one scrollbar,
TkScrollbar#assign method may help you.
Please see the example "ext/tk/sample/tkmultilistframe.rb" on your
Ruby source tree.
I'll be doing a lot of mathematical curve drawing [ie, plotting
some statistical functions].
Ruby/Tk can support many (almost all) of graph libraries which can
work with Tcl/Tk.
Even if there is no Ruby/Tk's wrapper for such graph library, Ruby/Tk
can call Tcl/Tk's commands to control the library with Tk.tk_call.
If 2D graphs are enough for your purpose, BLT extension may be suitable.
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
I need to create an app that will use Ruby/TK and Ruby/MySql.
It will be a standalone pc app...
I'm going thru the "Pickaxe" book...and it contains a chapter on Tk -
but I'm looking for a good reference that covers Ruby and Tk in greater
detail. I'll be doing a lot of mathematical curve drawing [ie, plotting
some statistical functions].
The "Pickaxe" doesn't cover databases...I'm particularly interested in
using MySQL with Ruby.
I prefer textbooks...
Will someone make a recommendation.
THX,
Pat
I'm ok now with Tcl/Tk...
However, I'm still baffled by connecting Rudy to MySql...
I tried downloading Gem but couldn't get past the question requesting
what I wanted to install...the list contained about 30 items...each
numbered...I replied with a 2 but it was rejected...
I need to create an app that will use Ruby/TK and Ruby/MySql.
It will be a standalone pc app...
I'm going thru the "Pickaxe" book...and it contains a chapter on Tk - but I'm looking for a good reference that covers Ruby and Tk in greater detail. I'll be doing a lot of mathematical curve drawing [ie, plotting some statistical functions].
The "Pickaxe" doesn't cover databases...I'm particularly interested in using MySQL with Ruby.
I prefer textbooks...
Will someone make a recommendation.
THX,
Pat
I'm ok now with Tcl/Tk...
However, I'm still baffled by connecting Rudy to MySql...
I tried downloading Gem but couldn't get past the question requesting what I wanted to install...the list contained about 30 items...each numbered...I replied with a 2 but it was rejected...
It looks like DBI is another way to go...
I'd appreicate any advice.
Thanks,
Pat
Some of the gems have two versions -- a source version for those folks like me who run a Gnu/Linux platform, and a pre-compiled Windows version. And if the gem has multiple version numbers, there will be two choices for each of those. So in general:
1. If you're on Windows, pick the "mswin" version, otherwise, pick the source version.
2. Unless you have reasons to use an older version, pick the most recent one.
3. If you did *that* and "got rejected", file a bug report with the package maintainer.
Some of the gems have two versions -- a source version for those folks
like me who run a Gnu/Linux platform, and a pre-compiled Windows
version. And if the gem has multiple version numbers, there will be two
choices for each of those. So in general:
1. If you're on Windows, pick the "mswin" version, otherwise, pick the
source version.
2. Unless you have reasons to use an older version, pick the most recent
one.
3. If you did *that* and "got rejected", file a bug report with the
package maintainer.
Ed,
Thanks for the 'heads up'...I'll try this again over the weekend...
Good weekend,
Pat