Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #3743

Re: Tk : non blocking Tk.mainloop

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 <jujusl@free.fr>
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> (permalink)
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

Show key headers only | View raw


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 :
==============================
..
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 = 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
..
==============================

Running the small script gives the same problem ; here is the end of the
debug output showing an exception :
==============================
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
==============================

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éphane

-- 
Posted via http://www.ruby-forum.com/.

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Tk : non blocking Tk.mainloop Juju SL <jujusl@free.fr> - 2011-04-13 12:20 -0500
  Re: Tk : non blocking Tk.mainloop botp <botpena@gmail.com> - 2011-04-13 18:02 -0500
  Re: Tk : non blocking Tk.mainloop Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> - 2011-04-24 17:16 -0500
  Re: Tk : non blocking Tk.mainloop Juju SL <jujusl@free.fr> - 2011-04-28 16:03 -0500
    Re: Tk : non blocking Tk.mainloop Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> - 2011-04-29 04:48 -0500
  Re: Tk : non blocking Tk.mainloop Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> - 2011-04-29 17:27 -0500
    Re: Tk : non blocking Tk.mainloop Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> - 2011-05-02 04:51 -0500
  Re: Tk : non blocking Tk.mainloop Juju SL <jujusl@free.fr> - 2011-04-29 14:37 -0500
  Re: Tk : non blocking Tk.mainloop Juju SL <jujusl@free.fr> - 2011-05-02 15:46 -0500
    Re: Tk : non blocking Tk.mainloop Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> - 2011-05-02 21:21 -0500
      Re: Tk : non blocking Tk.mainloop Patrick Lynch <kmandpjlynch@verizon.net> - 2011-05-03 08:52 -0500
        Re: Tk : non blocking Tk.mainloop Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> - 2011-05-04 08:14 -0500
          Forward delete with irb on a iMac Snow Leopeard machine... Patrick Lynch <kmandpjlynch@verizon.net> - 2011-05-04 11:45 -0500
            Re: Forward delete with irb on a iMac Snow Leopeard machine... Stu <stu@rubyprogrammer.net> - 2011-05-04 12:31 -0500
              Re: Forward delete with irb on a iMac Snow Leopeard machine... Patrick Lynch <kmandpjlynch@verizon.net> - 2011-05-05 10:38 -0500
      Re: Tk : non blocking Tk.mainloop Juju SL <jujusl@free.fr> - 2011-05-05 15:11 -0500
        Re: Tk : non blocking Tk.mainloop Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> - 2011-05-06 17:28 -0500
  Re: Tk : non blocking Tk.mainloop Akshay Jangid <akshay.dce@gmail.com> - 2011-05-04 13:01 -0500
  Re: Tk : non blocking Tk.mainloop Akshay Jangid <akshay.dce@gmail.com> - 2011-05-05 03:19 -0500
  Re: Tk : non blocking Tk.mainloop Juju SL <jujusl@free.fr> - 2011-05-16 14:15 -0500
    Re: Tk : non blocking Tk.mainloop Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> - 2011-05-19 14:59 -0500

csiph-web