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


Groups > comp.lang.ruby > #3877

Re: Tk : non blocking Tk.mainloop

From Patrick Lynch <kmandpjlynch@verizon.net>
Newsgroups comp.lang.ruby
Subject Re: Tk : non blocking Tk.mainloop
Date 2011-05-03 08:52 -0500
Organization Service de news de lacave.net
Message-ID <DBA039E5453C4849A525D5FF801EB84A@UserPC> (permalink)
References <58d66ab4de539ec84adb59d9fbde9312@ruby-forum.com> <beee0c75cd89cf0fa720304393532c71@ruby-forum.com> <20110503.112139.74755421.nagai@ai.kyutech.ac.jp>

Show all headers | View raw


Good morning,
You're doing better than me...
I'm working with an iMac Snow Leopard...and Ruby 1.8.7...
I have TK installed and can access it from the Bash command line - but it is 
not known to my Ruby, eg, require 'Tk' returns and error message in irb...
I probably should have started a separate link...but I thought I stand a 
good chance of getting some help here...
Thank you
----- Original Message ----- 
From: "Hidetoshi NAGAI" <nagai@ai.kyutech.ac.jp>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>; <jujusl@free.fr>
Sent: Monday, May 02, 2011 10:21 PM
Subject: Re: Tk : non blocking Tk.mainloop


> Thank you for your reply.
>
> From: Juju SL <jujusl@free.fr>
> Subject: Re: Tk : non blocking Tk.mainloop
> Date: Tue, 3 May 2011 05:46:55 +0900
> Message-ID: <beee0c75cd89cf0fa720304393532c71@ruby-forum.com>
>> So, I patched manually the tk.rb file :
>
> You don't need manual patch. Please use "patch" command.
>
> # Or, packaged version of tk.rb is not a normal one of ruby192p0?
> # If so, please tell me the version of your package.
>
>> Unfortunately, my small scripts ends with an exception :
>
> Hmmm... Maybe, I misunderstood the reason of the trouble.
> The exception is not important.
> It is a normal situation when a Tcl/Tk interpreter is deleted at exit.
>
> I want to know when and how Tk.mainloop exits.
> Could you send me a *FULL* debug log with tk.rb (patched by previous
> (ruby-talk:382536) patch) patched by the following?
>
> --- tk.rb~ 2011-05-02 18:16:29.000000000 +0900
> +++ tk.rb 2011-05-03 11:18:17.000000000 +0900
> @@ -1852,32 +1852,56 @@
>       TclTkLib.mainloop(check_root)
>
>     else ### Ruby 1.9 !!!!!
> +p :log001
>       unless TkCore::INTERP.default_master?
> +p :log002
>         # [MultiTkIp] slave interp ?
>         return TkCore::INTERP._thread_tkwait('window', '.') if check_root
>       end
> +p :log003
>
>       # like as 1.8, withdraw a root widget before calling Tk.mainloop
>       TkCore::INTERP._eval_without_enc('catch {unset 
> __initial_state_of_rubytk__}')
> +p :log004
>       INTERP_THREAD.run
> +p :log005
>
>       begin
>         TclTkLib.set_eventloop_window_mode(true)
> +p :log006
>         if check_root
> +p :log007
>           INTERP_MUTEX.synchronize{
> +p :log008
>             INTERP_ROOT_CHECK.wait(INTERP_MUTEX)
> +p :log009
>             status = INTERP_THREAD_STATUS.value
> +p [:log010, status]
>             if status && TkCore::INTERP.default_master?
>               INTERP_THREAD_STATUS.value = nil if $SAFE < 4
> +p :log011
>               raise status if status.kind_of?(Exception)
>             end
> +p :log012
>           }
>         else
> -          INTERP_THREAD.value
> +p :log013
> +          # INTERP_THREAD.value
> +          begin
> +            INTERP_THREAD.value
> +          rescue Exception => e
> +p [:log014, e]
> +            raise e
> +          end
>         end
> +      rescue Exception => e
> +p [:log015, e]
> +        raise e
>       ensure
> +p :log016
>         TclTkLib.set_eventloop_window_mode(false)
>       end
> +p :log017
>     end
>   end
>
>
>
> -- 
> Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
> Department of Artificial Intelligence, Kyushu Institute of Technology
>
> 

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