Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > IRB on a text widget of Ruby/Tk

Reply
Thread Tools

IRB on a text widget of Ruby/Tk

 
 
Hidetoshi NAGAI
Guest
Posts: n/a
 
      11-08-2006
Hi,

A sample tool of Ruby/Tk is available.
It uses a text widget as a console I/O.
If you have troubles about thread-switching on IRB
(for example, IRB on a command-prompt of Windows),
it may be able to help you.

Console I/O on Windows blocks Ruby's thread-switching.
That is, IRB cannot work with background threads on Windows.
On the sample script, a text widget takes the place of a console
without blocking thread-switching.
That is similar to Tcl/Tk's "wish" unless not calling shell commands.

If you may try it, please get two files from Ruby's CVS tree.
Those are "ext/tk/sample/irbtkw.rbw" and "ext/tk/sample/tktextio.rb".
"irbtkw.rbw" is the main script.

"tktextio.rb" is updated (it is a by-product of Ruby/TkORCA).
Old one cannot work with "irbtkw.rbw".

Probably, "irbtkw.rbw" will work on ruby-1.8.2 or later.
--
Hidetoshi NAGAI ((E-Mail Removed))

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Tkinter.event.widget: handler gets name instead of widget. Terry Reedy Python 15 07-16-2012 10:32 AM
Re: Tkinter.event.widget: handler gets name instead of widget. Frederic Rentsch Python 0 07-09-2012 08:39 PM
Tkinter.event.widget: handler gets name instead of widget. Frederic Rentsch Python 0 07-08-2012 09:19 PM
user interface widget: ordered selection list: do any UI library has this widget? zhangweiwu@realss.com Javascript 0 10-10-2006 01:02 AM
IRB MacOS X Dashboard Widget Gavin Kistner Ruby 3 05-02-2005 04:18 PM



Advertisments