On Apr 9, 10:22  ᮮ 
> From: Diego.Viras... / gmail.com
> Subject: Re:Ruby1.9.1+Tkproblem
> Date: Thu, 9 Apr 2009 22:25:04 +0900
> Message-ID: <d9dfd327-ba7c-44f4-a8d8-5ab177664c51 / r15g2000vbi.googlegroups.com>
>
> > However I tried to read a bit of thetk.rb file... and noticed the
> > known bug about TkAqua. MyTkis version 8.4.7... could it be that
> > that too has the same bug? (you check for a version >8.4.9).
>
> May not be...
> I thought that such kind of trouble depends on TkAqua's specification
> with native threads.
> If you use standard Tcl/Tk.framework libraries and you have no other
> Tcl/Tklibraries on your MacOSX box, please tell me your configure
> options when you compiledruby(tcltklib).
>
> However, I'm happy if you try the patch and report the result of the
> following two test codes which are different at the first line only.
> ---------------------------------------------------------------
> module TkCore; RUN_EVENTLOOP_ON_MAIN_THREAD=false; end
> p TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD
> require 'tk'
> p TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD
> p TkButton.new(:text=>'TEST',:command=>proc{p 'test'}).packTk.mainloop
> ---------------------------------------------------------------
> ---------------------------------------------------------------
> module TkCore; RUN_EVENTLOOP_ON_MAIN_THREAD=true; end
> p TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD
> require 'tk'
> p TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD
> p TkButton.new(:text=>'TEST',:command=>proc{p 'test'}).packTk.mainloop
> ---------------------------------------------------------------
> --

Hi, sorry for the delay.
I've done everything you asked and here are the results.

After applying the patch you sent, the first example stalls like
usual, but the second one does not and it works perfectly well.

So I tried without the patch, and I got the same results: the first
case stalls, the second one works.

Finally I tried adding that one line to my code, and indeed now it
works perfectly well.

My environment is OS X 10.4.11, Ruby 1.9.1p0, Tk 8.4.7. And my
computer uses the old PowerPC CPU (a G4 to be exact).

Thanks a lot for the help