IRB on a text widget of Ruby/Tk

Discussion in 'Ruby' started by Hidetoshi NAGAI, Nov 8, 2006.

  1. 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 ()
    Hidetoshi NAGAI, Nov 8, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gavin Kistner

    IRB MacOS X Dashboard Widget

    Gavin Kistner, Apr 30, 2005, in forum: Ruby
    Replies:
    3
    Views:
    103
    Mark Hubbart
    May 2, 2005
  2. Replies:
    0
    Views:
    330
  3. Frederic Rentsch
    Replies:
    0
    Views:
    233
    Frederic Rentsch
    Jul 8, 2012
  4. Terry Reedy
    Replies:
    15
    Views:
    630
    Frederic Rentsch
    Jul 16, 2012
  5. Frederic Rentsch
    Replies:
    0
    Views:
    425
    Frederic Rentsch
    Jul 9, 2012
Loading...

Share This Page