Path: csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!feeds.phibee-telecom.net!talisker.lacave.net!lacave.net!not-for-mail From: Juju SL Newsgroups: comp.lang.ruby Subject: Re: Tk : non blocking Tk.mainloop Date: Fri, 29 Apr 2011 14:37:52 -0500 Organization: Service de news de lacave.net Lines: 70 Message-ID: <733de9fa2c38d6afb198de71ac3569a7@ruby-forum.com> References: <58d66ab4de539ec84adb59d9fbde9312@ruby-forum.com> NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: Quoted-printable X-Trace: talisker.lacave.net 1304106300 25075 65.111.164.187 (29 Apr 2011 19:45:00 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Fri, 29 Apr 2011 19:45:00 +0000 (UTC) In-Reply-To: <58d66ab4de539ec84adb59d9fbde9312@ruby-forum.com> X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 382396 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: <733de9fa2c38d6afb198de71ac3569a7@ruby-forum.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:3743 Hi Hidetoshi, I understand your need and as I asked for help, I have to help you back :) So I applied the patch to tk.rb : =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D .. set __initial_state_of_rubytk__ 1 trace add variable __initial_state_of_rubytk__ unset __startup_rbtk_mainloop__ update EOS begin begin #TclTkLib.mainloop_abort_on_exception =3D false .. and .. } until INTERP_THREAD[:interp] #Thread.pass INTERP_THREAD.run end # INTERP_THREAD.run raise INTERP_THREAD[:interp] if INTERP_THREAD[:interp].kind_of? Exception .. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Running the small script gives the same problem ; here is the end of the debug output showing an exception : =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D tcltklib: destroy root widget tcltklib: check `finalize-hook-proc' tcltklib: check `foreach' & `after' tcltklib: cancel after callbacks tcltklib: finish ip_finalize Exception `TypeError' at /usr/lib/ruby/1.9.1/tk.rb:1283 - exception class/object expected tcltklib: eventloop_ensure: current-thread : 8802278 tcltklib: eventloop_ensure: eventloop-thread : 8802278 tcltklib: eventloop-ensure: new eventloop-thread -> 4 tcltklib: finish current eventloop 8802278 tcltklib: ip is deleted tcltklib: ip is deleted tcltklib: ip is deleted tcltklib: delete deleted IP tcltklib: free Tcl Interp 881a678 tcltklib: complete freeing Tcl Interp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D But the weird thing is that sometimes it runs OK ! (once every 6 ou 7 times) ; I just run the same command again and again... Hope this will help ! Best regards St=C3=A9phane -- = Posted via http://www.ruby-forum.com/.=