From: Jun Young Kim Date: 2009-04-14T16:37:26+09:00 Subject: Re: Ruby 1.9.1 + Tk problem --Apple-Mail-445--605560596 Content-Type: text/plain; charset=EUC-KR; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable this is a first example. $> ruby test.rb false false # "test" <-- when I click "TEST" button. "test" "test" this is a second example. $> ruby test.rb true true # "test" <-- when I click "TEST" button. "test" 2009. 04. 10, =BF=C0=C0=FC 6:22, Hidetoshi NAGAI =C0=DB=BC=BA: > From: Diego.Virasoro@gmail.com > Subject: Re: Ruby 1.9.1 + Tk problem > Date: Thu, 9 Apr 2009 22:25:04 +0900 > Message-ID: = > >> However I tried to read a bit of the tk.rb file... and noticed the >> known bug about TkAqua. My Tk is 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/Tk libraries on your MacOSX box, please tell me your configure > options when you compiled ruby (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=3Dfalse; end > p TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD > require 'tk' > p TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD > p TkButton.new(:text=3D>'TEST',:command=3D>proc{p 'test'}).pack > Tk.mainloop > --------------------------------------------------------------- > --------------------------------------------------------------- > module TkCore; RUN_EVENTLOOP_ON_MAIN_THREAD=3Dtrue; end > p TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD > require 'tk' > p TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD > p TkButton.new(:text=3D>'TEST',:command=3D>proc{p 'test'}).pack > Tk.mainloop > --------------------------------------------------------------- > --=20 > Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) > > --Apple-Mail-445--605560596--