[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Looking for good reads on Ruby TK GUI programming

Harry Truax

3/8/2006 4:15:00 PM

Hello,

Could anyone suggest any good examples, articles, books, etc. for Ruby TK
GUI programming with particular emphasis on multi-screen/window GUI
applications? For example, someone is working on one window, clicks on a
button and another window 'takes-over the screen', they finish with that one
and return to the previous window.

Thanks,

Harry
13 Answers

Hidetoshi NAGAI

3/9/2006 2:21:00 AM

0

Harry Truax

3/9/2006 2:13:00 PM

0

Hi,

I didn't check the source tree you mentioned, but I will, thanks.

I am looking for info on the routines needed to have a GUI that involves
more
Than one screen/window - I guess TKToplevel is one of them. Most of the
stuff I
Find is just the code being used with no explanation, the user is assumed to
Know what it does. I am looking for something that explains the routines.

I basically want to switch between one or more windows, each window takes up
the
whole screen, the user would enter/view data in each window, basic GUI
stuff.

Thanks,

Harry

-----Original Message-----
From: Hidetoshi NAGAI [mailto:nagai@ai.kyutech.ac.jp]
Sent: Wednesday, March 08, 2006 9:21 PM
To: ruby-talk ML
Subject: Re: Looking for good reads on Ruby TK GUI programming

From: "Harry Truax" <htruax@stf.com>
Subject: Looking for good reads on Ruby TK GUI programming
Date: Thu, 9 Mar 2006 01:14:47 +0900
Message-ID: <200603081114464.SM03532@htruax>
> Could anyone suggest any good examples, articles, books, etc. for Ruby
> TK GUI programming with particular emphasis on multi-screen/window GUI
> applications? For example, someone is working on one window, clicks on
> a button and another window 'takes-over the screen', they finish with
> that one and return to the previous window.

Do you mean about such like as TkWindow#grab or TkWindow#focus?
Or usage of 'screen' option of TkToplevel widget?
Or again, how to control another {Ruby|Tcl}/Tk process on the same or other
machine with RemoteTkIp class?

Did you check samples in 'ext/tk/sample' directory on your ruby source tree?
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)






Gregor Kopp

3/9/2006 2:48:00 PM

0

http://www.jbrowse.com/text/ruby...


Harry Truax schrieb:
> Hello,
>
> Could anyone suggest any good examples, articles, books, etc. for Ruby TK
> GUI programming with particular emphasis on multi-screen/window GUI
> applications? For example, someone is working on one window, clicks on a
> button and another window 'takes-over the screen', they finish with that one
> and return to the previous window.
>
> Thanks,
>
> Harry
>

Chris Hulan

3/9/2006 3:00:00 PM

0

Harry Truax wrote:
> Hello,
>
> Could anyone suggest any good examples, articles, books, etc. for Ruby TK
> GUI programming ...

I haven't had a chance to check myself, but I understand the some of
the Perl/TK books are good if you can grok Perl.

cheers

Karl von Laudermann

3/9/2006 3:37:00 PM

0

Harry Truax wrote:
> Hello,
>
> Could anyone suggest any good examples, articles, books, etc. for Ruby TK
> GUI programming with particular emphasis on multi-screen/window GUI
> applications?

No. And it's frustrating. The only Ruby/Tk tutorials I've been able to
find, including the Ruby/Tk chapter of the Pickaxe, just provide a few
simple examples, then tell you to go find some other Tk API
documentation and translate it in your head into Ruby/Tk. It took me
maybe two hours of Googling just to figure out how to programmatically
select some text in a TkText widget. (The answer is that TkText has a
concept called "tags", and you can apply any arbitrary tag to any range
of text in the widget, and to select some text you apply a predefined
tag called "sel" to the desired range using the tag_add() method.
Because a set_selection() method would have been too straightforward
and useful.)

It would be really nice if someone would write a definitive book on
developing GUI apps with Ruby/Tk. What I'm envisioning is a complete
guide on how to develop GUI apps using Tk, covering all necessary
concepts such as how to use most widgets (buttons, checkboxes, text
controls, menus, etc.), how to do modal and non-modal dialogs, how to
manage multiple windows, event handling, key shortcuts, etc. And it
would use Ruby and Ruby/Tk exclusively as the language and API for its
code samples. And of course include a complete Ruby/Tk API reference as
it's second half.

And if, say, the Pragmatic Programmers were to write such a book, that
would rock.

Harry Truax

3/9/2006 3:47:00 PM

0

Karl,

I know what you mean. I have found several Perl/TK examples, but found it
Difficult in discovering the translation to Ruby/TK. I guess I will go and
Buy a good TK book on GUI programming and start there.

Harry

-----Original Message-----
From: Karl von Laudermann [mailto:doodpants@mailinator.com]
Sent: Thursday, March 09, 2006 10:39 AM
To: ruby-talk ML
Subject: Re: Looking for good reads on Ruby TK GUI programming

Harry Truax wrote:
> Hello,
>
> Could anyone suggest any good examples, articles, books, etc. for Ruby
> TK GUI programming with particular emphasis on multi-screen/window GUI
> applications?

No. And it's frustrating. The only Ruby/Tk tutorials I've been able to find,
including the Ruby/Tk chapter of the Pickaxe, just provide a few simple
examples, then tell you to go find some other Tk API documentation and
translate it in your head into Ruby/Tk. It took me maybe two hours of
Googling just to figure out how to programmatically select some text in a
TkText widget. (The answer is that TkText has a concept called "tags", and
you can apply any arbitrary tag to any range of text in the widget, and to
select some text you apply a predefined tag called "sel" to the desired
range using the tag_add() method.
Because a set_selection() method would have been too straightforward and
useful.)

It would be really nice if someone would write a definitive book on
developing GUI apps with Ruby/Tk. What I'm envisioning is a complete guide
on how to develop GUI apps using Tk, covering all necessary concepts such as
how to use most widgets (buttons, checkboxes, text controls, menus, etc.),
how to do modal and non-modal dialogs, how to manage multiple windows, event
handling, key shortcuts, etc. And it would use Ruby and Ruby/Tk exclusively
as the language and API for its code samples. And of course include a
complete Ruby/Tk API reference as it's second half.

And if, say, the Pragmatic Programmers were to write such a book, that would
rock.






Randy Kramer

3/9/2006 4:46:00 PM

0

On Wednesday 08 March 2006 09:21 pm, Hidetoshi NAGAI wrote:
> Do you mean about such like as TkWindow#grab or TkWindow#focus?
> Or usage of 'screen' option of TkToplevel widget?
> Or again, how to control another {Ruby|Tcl}/Tk process on the
> same or other machine with RemoteTkIp class?
>
> Did you check samples in 'ext/tk/sample' directory
> on your ruby source tree?

Sorry for piggybacking here, but I thought someone reading this thread might
know--does Ruby TK have an HTML rendering "widget"?

Randy Kramer


Carl

3/9/2006 5:00:00 PM

0

Randy,

This thread linked below may be of interest to you:
http://groups.google.com/group/comp.lang.ruby/msg/667a7e...

Hope that helps,
Carl.

Hidetoshi NAGAI

3/9/2006 5:18:00 PM

0

Hidetoshi NAGAI

3/9/2006 5:34:00 PM

0