From: Ferenc Engard Date: 2003-09-07T06:33:33+09:00 Subject: Re: 2 questions about TkVariable and ruby/tk Hello, I have simplified the problem. Here is the testprogram: --------------------------- #!/usr/bin/env ruby require 'tk.rb' begin Tk::INTERP._eval('bad_cmd_name xxsx') rescue end puts "before mainloop" Tk.mainloop --------------------------- It prints out 'before mainloop', but do not creates its X form, and cannot be interrupted by ctrl-c. Tested with 1.6.8 and 1.8.0. (Anyway, TkVariable::result generates a (catched) error when the tcl variable is an array, that's why the program in my previous posting encountered this problem.) If the _eval cmd is replaced to --------------------------- Tk.tk_call('bad_cmd_name','xxsx') --------------------------- then on 1.6.8 it prints the following error message, and do not print the "before mainloop" message: /usr/lib/ruby/1.6/tk.rb:604:in `tk_call': invalid command name `bad_cmd_name' (NameError) from ./test2.rb:7 On 1.8.0 it behaves just as with _eval (i.e. no form). I have made another test where the following call is in a button's callback, and had similar results. So, on the first error in tcl the program hangs out. This is done on a debian unstable linux, with the ruby and ruby1.8 packages. On my win machine there are no such problems (except that Tk::tk_call do not forward exceptions to the caller, but displays the 'Error in tcl script' error window) (version 1.6.8). What can be the problem? If it matters, I use XWin32 as X-server (do not have X on the linux machine). Should I try the CVS version, or is it a local problem to me? Thank you: Circum