[1.8.7][1.9.1][tk] $B<+A0<BAu$N3HD%(B widget $B$r;H$$$?$$>l9g(B

e$B2!ED$G$9!#e(B

e$B:G6a$Ne(B(e$B!)e(B) Ruby/Tk
e$B$K4X$7$F$465<(;r$j$?$/%a!<%k$7$^$7$?!#e(B
e$BMQNc$H$7$F$O7k9=%K%C%A$@$m$&$H<+Ii$7$F$$$^$9e(B(^^;

Ruby/Tk e$B$Ne(B famous extention e$B%5%]!<%HI8=2=$K$h$j!"e(B e$B%*%j%8%J%ke(B Tk e$B$KB8:_$7$J$$e(B widget e$B$K4X$7$F$Oe(B e$BI8=$Ge(B extention e$BB&$N%U%!%$%k$re(B require e$B$9$k$h$&e(B
autoload e$BEPO?$5$l$^$9!#e(B
e$B$=$l$ie(B extention e$B$,B8:$7$J$$4D6-$K$F!"e(B
e$BNc$($Pe(B TkCombobox e$B$@$1$r<+A0<BAu$7$F;H$$$?$$>l9g!"e(B
e$B$3$Ne(B autoload
e$B$,F/$$$FB8:
$7$J$$%U%!%$%k$rFI$_$K$$$C$F$7$^$$!"e(B
TkPackage e$B$K$Fe(B RuntimeError e$B=*N;$7$F$7$^$$$^$9!#e(B

e$B!Ve(Bsample/tkcombobox.rb e$B$,F0$+$J$/$J$C$F$$$^$9!We(B
e$B$H$$$&I=8=$NJ}$,%7%s%W%k$GNI$$$+$bCN$l$^$;$s!#e(B

e$B$b$7!“e(Btk/ttk_selector.rb e$B$Ne(B
“Ttk is a standard library on Tcl/Tk8.5+”
e$B$,e(B 8.4 e$B%5%]!<%H$Ne(B terminate e$B$r0UL#$7$J$$$N$G$”$l$P!“e(B
autoload e$BEPO?$r8+9g$;$F$$$?$@$1$l$P$”$j$,$?$$$G$9!#e(B

e$B$^$?!"$R$H$^$:<j85$G$O!"e(B

Object.const_set(:TkCombobox, Class.new(XXX))
class TkCombobox < XXX

e$B$H$9$k$3$H$Ge(B autoload e$B$rL58z2=$7$F$$$^$9!#e(B

e$B$h$jE,@Z$J2rK!$,$"$l$P$*65$(2<$5$$!#e(B

e$B59$7$/$*4j$$$7$^$9!#e(B

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B

From: [email protected]
Subject: [ruby-dev:38323] [1.8.7][1.9.1][tk] e$B<+A0<BAu$N3HD%e(B widget
e$B$r;H$$$?$$>l9ge(B
Date: Fri, 24 Apr 2009 21:28:42 +0900
Message-ID: [email protected]

e$B!Ve(Bsample/tkcombobox.rb e$B$,F0$+$J$/$J$C$F$$$^$9!We(B
e$B$H$$$&I=8=$NJ}$,%7%s%W%k$GNI$$$+$bCN$l$^$;$s!#e(B

e$B$b$7!“e(Btk/ttk_selector.rb e$B$Ne(B
“Ttk is a standard library on Tcl/Tk8.5+”
e$B$,e(B 8.4 e$B%5%]!<%H$Ne(B terminate e$B$r0UL#$7$J$$$N$G$”$l$P!“e(B
autoload e$BEPO?$r8+9g$;$F$$$?$@$1$l$P$”$j$,$?$$$G$9!#e(B

8.4 e$B$He(B 8.5 e$B$H$N4V$G8_49@-$N$"$k%9%/%j%W%H$re(B
e$B=q$-$d$9$$$h$&$K$H9M$($F$$$?$N$G$9$,!$e(B
e$B!V>.$5$J?F@Z!$Bg$-$J$*@$OC!W$K$J$C$F$7$^$C$?$h$&$G$9$M!%e(B
e$B$4$a$s$J$5$$!%e(B

e$B$G$9$,!$>-Mh$N5!G=6/2=$N:]$K$bF1MM$NLdBj$,=P$F$7$^$&$G$"$m$&$3$H$de(B
default_widget_set e$B$N@ZBX$(5!G=$N$3$H$r9M$($k$H!$e(B
e$BEPO?$r:o$C$F$7$^$&$N$b>/!9?I$$$G$9!%e(B

e$B$^$?!"$R$H$^$:<j85$G$O!"e(B

Object.const_set(:TkCombobox, Class.new(XXX))
class TkCombobox < XXX

e$B$H$9$k$3$H$Ge(B autoload e$B$rL58z2=$7$F$$$^$9!#e(B

e$B>WFM$9$k%/%i%9e(B (e$B$3$N>l9g$Oe(B TkCombobox e$B%/%i%9e(B)
e$B$rDj5A$9$kA0$Ke(B

Object.instance_eval{remove_const :TkCombobox} if Object.autoload?
:TkCombobox

e$B$H$7$Fe(B autoload e$B$rL58z2=$7$F$/$@$5$$!%e(B

sample/tkcombobox.rb e$B$K$O!$$3$l$rDI2C$7$F$*$/$h$&$K$7$^$9!%e(B

e$B$^$?!$e(Bdefault_widget_set
e$B@ZBX$($H$N@09g$b<h$i$;$?$$$N$G$"$l$P!$e(B

e$B2!ED$G$9!#e(B

e$B$9$P$d$$8fJVEz$"$j$,$H$&$4$6$$$^$9!#e(B

e$B!V>.$5$J?F@Z!$Bg$-$J$*@$OC!W$K$J$C$F$7$^$C$?$h$&$G$9$M!%e(B
e$B$4$a$s$J$5$$!%e(B

e$B$H$s$G$b$J$$$G$9!#e(B
e$B$"$/$^$G$bEvJ}$N6K$a$F%K%C%A$J%f!<%9%1!<%9$G$NOC$H<+3P$7$F$$$^$9!#e(B

e$B?’!9$J=hM}7O!"e(BJRuby e$B$de(B IronRuby, RubyCocoa ? e$B$J$I!"e(B
Ruby e$B$N%W%j%_%F%#%V$,e(B Native Object e$B$K%P%$%s%I$5$l$F$$$kMM$be(B
e$BAG@2$i$7$$$H;W$C$F$$$^$7$?$,!“e(B
e$B1J0f$5$s$Ne(B Tk Wrapper
e$B$N9*L/$5$b!”$^$?JL$N0UL#$GAG@2$i$7$$$H;W$$$^$9!#e(B
Tk e$B$X$N0&$r46$8$^$9e(B :slight_smile:

e$B$G$9$,!$>-Mh$N5!G=6/2=$N:]$K$bF1MM$NLdBj$,=P$F$7$^$&$G$"$m$&$3$H$de(B
default_widget_set e$B$N@ZBX$(5!G=$N$3$H$r9M$($k$H!$e(B
e$BEPO?$r:o$C$F$7$^$&$N$b>/!9?I$$$G$9!%e(B

e$B$=$&$G$9$M!#e(B
e$B86B’!"$d$O$j?J2=$NJ}8~$G$"$k$Y$-$H9M$($^$9!#e(B
e$BK\7o$O0z$-B3$-%m!<%+%k$GBP=h$7$^$9!#e(B

e$B$b$7$I$3$+$K!"e(B
Ruby/Tk e$BE*$KM=Ls8l$H$J$C$F$$$kJ*$N%j%9%H$d!"e(B
8.4 e$B4D6-$G$N>WFM2sHrJ}K!$J$I!"e(B
Mini HowTo e$B$H$7$F$^$H$^$C$F$$$l$P$H;W$$$^$9$,!"e(B
e$B$=$l$b%K!<%:$N5,LO$K$h$j$1$j$G$9$7$M!#e(B

e$B$=$&$$$&0UL#$G$Oe(B ML e$B$,e(B Tiny HowTo
e$B$K$J$k$Y$-$G$7$g$&$,!"e(B
e$B;d$N%a!<%k$N=q$-J}$@$He(B tag e$B$K$J$kC18l$,ITB-$7$F$$$k$+$be(B(^^;
e$BH/8=;~$N%(%i!<%a%C%;!<%8$rE=$C$F$*$-$^$9e(B(^^;;;

/usr/lib/ruby/1.8/tk/package.rb:86:in `require’: TkPackage can’t find package
tile (RuntimeError)

Object.instance_eval{remove_const :TkCombobox} if Object.autoload? :TkCombobox

e$B$J$k$[$I!"$3$&$J$C$F$$$^$7$?$+!#e(B
e$B$"$j$,$H$&$4$6$$$^$9!#e(B
e$B$5$C$=$/<h$jF~$l$^$9!#e(B

e$B2!ED$G$9!#e(B

e$B$b$7NI$+$C$?$i!$$=$N:]$K%F%9%H$7$F$$$?$@$1$^$9$H=u$+$j$^$9!%e(B

e$BN;2r$7$^$7$?!#e(B
e$B$46(NO$5$;$FD:$-$^$9!#e(B

e$B$A$J$_$KEvJ}!"e(BRHEL 5.x x86_64 e$B$,<g$J4D6-$G$9!#e(B

RHEL 5.x e$B%*%j%8%J%k$Oe(B 1.8.5 e$B$J$s$G$9$,!"e(B
e$B$A$g$C$H8B3&$,8+$($F$-$?5$$,$9$k$N$G!"e(B
1.8.7 / 1.9.1 e$B$K0\9T$9$k;v$r8!F$!&8!>ZCf$G$9!#e(B

e$B!te(Bspawn e$B$O9"$+$i<j$,=P$F$$$k$N$G$9$,!"$d$O$j!"e(B1.9
e$BBP1~$O>/$7Fq9R$7$=$&$G$9!#e(B

e$B$"$He(B Cygwin e$B$b>C6KE*$K%5%]!<%H$7$F$$$^$9!#e(B
e$B$4$/5)$Ke(B Solaris (IA-32) e$B$b;H$$$^$9!#e(B

e$B?=$7Lu$J$$$N$G$9$,!$$=$l$^$G$N4V$O1~5^=hCV$G%m!<%+%k$Ke(B
e$BBP1~$7$F$*$$$F$$$?$@$1$^$9$h$&$*4j$$$$$?$7$^$9!%e(B

e$B?=$7Lu$J$$$@$J$s$Fe(B(^^;
e$B%j%]%8%H%j$K%3%_%C%H$9$kJQ99$,e(B
e$B==J,$K7z@_E*$JFbMF$H$O8@$($J$$$N$G$"$l$P!"e(B
e$B%m!<%+%kBP1~$rB3$1$k$Y$-$@$H9M$($F$$$^$9!#e(B

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B

From: Hidetoshi NAGAI [email protected]
Subject: [ruby-dev:38340] Re: [1.8.7][1.9.1][tk] e$B<+A0<BAu$N3HD%e(B
widget e$B$r;H$$$?$$>l9ge(B
Date: Mon, 27 Apr 2009 12:04:48 +0900
Message-ID: [email protected]

e$BN>J}$r;&$5$:$K2?$H$+$G$-$=$&$JBP=h0F$r;W$$IU$-$^$7$?!%e(B
e$B$A$g$C$H:#$OK\6H$NJ}$,K;$7$$$N$G$9$0$H$O$$$+$J$$$+$b$7$l$^$;$s$,!$e(B
e$B$b$&>/$7$D$a$F$_$F!$;E>e$j$^$7$?$iK\e(B ML e$B$GO"Mm$7$^$9!%e(B
e$B$b$7NI$+$C$?$i!$$=$N:]$K%F%9%H$7$F$$$?$@$1$^$9$H=u$+$j$^$9!%e(B

e$BD9$i$/J|CV>uBV$G?=$7Lu$"$j$^$;$s$G$7$?$,!$e(B
e$B6a$$Fb$K;E>e$2$Fe(B commit e$B$G$-$=$&$G$9!%e(B

e$BJ}?K$r4JC1$K@bL@$7$F$*$-$^$9$H!$0J2<$N$h$&$K$J$j$^$9!%e(B

e$B$^$:e(B
e$B!&e(Bwidget_set e$B$He(B toplevel e$BL>$Ne(B symbol
e$B$H$r4IM}$9$ke(B TABLE[set][sym]
e$B!&e(Btoplevel e$B$Ne(B alias e$B$rDj5A$9$k%b%8%e!<%ke(B ALIASES
e$B!&e(Btoplevel e$B$Ne(B alias (sym) e$B$r4IM}$9$ke(B OWNER[sym]
e$B$H$$$&$h$&$J$b$N$rMQ0U$7$F$*$-!$e(B
ALIASES e$B$re(B Oject e$B%/%i%9$Ke(B Mix-in e$B$7$^$9!%e(B
e$BA`:n;~$N>r7o$O>/$7$d$d$3$7$$$N$G$9$,!$e(B
e$BI,MW$K1~$8$Fe(B Object e$B%/%i%9>e$K$be(B ALIASES
e$B$HF1$8$b$N$rDj5A$7$^$9!%e(B

e$BNc$($Pe(B TkButton(Tk::Button) e$B$He(B TkCombobox(Ttk::Combobox)
e$B$K$*$$$Fe(B
ALIASES Object

TkButton(Tk::Button) ← TkButton(Tk::Button)
TkCombobox(Ttk::Combobox) ← e$BL$Dj5Ae(B
e$B$H$$$&$h$&$J>u67$K$J$k$o$1$G$9!%e(B

e$B$3$l$K$h$j!$e(BTkButton, TkCombobox e$B6&$K8+$($D$D$be(B
TkCombobox e$B$K$D$$$F$OFH<+%/%i%9$rDj5A$9$k$3$H$,2DG=$G$9!%e(B
e$B$=$N>l9g!$e(B
ALIASES Object

TkButton(Tk::Button) ← TkButton(Tk::Button)
TkCombobox(Ttk::Combobox) TkCombobox(e$BFH<+Dj5Ae(B)
e$B$H$J$j$^$9!%e(B

e$B$b$7e(B TkCombobox e$B$KFH<+%/%i%9$rDj5A$;$:$Ke(B TkCombobox.new
e$B$J$I$He(B
TkCombobox(Ttk::Combobox) e$B$r;2>H$7$?>l9g$Oe(B
ALIASES Object

TkButton(Tk::Button) ← TkButton(Tk::Button)
TkCombobox(Ttk::Combobox) ← TkCombobox(Ttk::Combobox)
e$B$H$J$j$^$9!%e(B

e$BM#0le(B(?)e$B$NLdBj$Oe(B TkCombobox e$B$,e(B Object
e$B%/%i%9>e$GL$Dj5A$N>uBV$Ge(B
TkCombobox e$B$K5!G=DI2C$7$h$&$H$7$Fe(B class TkCombobox
e$B$H$7$?>l9g$G$9!%e(B
e$B$3$N>l9g!$?7$7$$%/%i%9$,Dj5A$5$l$F$7$^$$!$4|BTDL$j$K$O$J$j$^$;$s!%e(B
e$B$G$9$,!$e(BTtk::Combobox e$B$rD>@$K;2>H$7$?>l9g$de(B
e$B@h$Ke(B default_widget_set e$B$re(B :Ttk e$B$K@ZBX$($?>l9g$K$Oe(B
Object e$B%/%i%9$X$NDj5A$r9T$&$N$G$3$NLdBj$O@8$8$^$;$s$7!$e(B
e$BL@<(E*$K8=:_$Ne(B default_widget_set
e$B$NMWAG$H$9$k$h$&$K@k8@$9$k$3$H$Ge(B
Object e$B%/%i%9$XDj5A$5$;$k$3$H$b2DG=$G$9$N$Ge(B
e$B5vMF$G$-$k%l%Y%k$G$O$J$$$+$H;W$$$^$9!%e(B

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B

From: [email protected]
Subject: [ruby-dev:38339] Re: [1.8.7][1.9.1][tk] e$B<+A0<BAu$N3HD%e(B
widget e$B$r;H$$$?$$>l9ge(B
Date: Mon, 27 Apr 2009 11:02:40 +0900
Message-ID: [email protected]

e$B$G$9$,!$>-Mh$N5!G=6/2=$N:]$K$bF1MM$NLdBj$,=P$F$7$^$&$G$"$m$&$3$H$de(B
default_widget_set e$B$N@ZBX$(5!G=$N$3$H$r9M$($k$H!$e(B
e$BEPO?$r:o$C$F$7$^$&$N$b>/!9?I$$$G$9!%e(B

e$B$=$&$G$9$M!#e(B
e$B86B’!“$d$O$j?J2=$NJ}8~$G$”$k$Y$-$H9M$($^$9!#e(B
e$BK\7o$O0z$-B3$-%m!<%+%k$GBP=h$7$^$9!#e(B

e$BN>J}$r;&$5$:$K2?$H$+$G$-$=$&$JBP=h0F$r;W$$IU$-$^$7$?!%e(B
e$B$A$g$C$H:#$OK\6H$NJ}$,K;$7$$$N$G$9$0$H$O$$$+$J$$$+$b$7$l$^$;$s$,!$e(B
e$B$b$&>/$7$D$a$F$_$F!$;E>e$j$^$7$?$iK\e(B ML e$B$GO"Mm$7$^$9!%e(B
e$B$b$7NI$+$C$?$i!$$=$N:]$K%F%9%H$7$F$$$?$@$1$^$9$H=u$+$j$^$9!%e(B

e$B?=$7Lu$J$$$N$G$9$,!$$=$l$^$G$N4V$O1~5^=hCV$G%m!<%+%k$Ke(B
e$BBP1~$7$F$*$$$F$$$?$@$1$^$9$h$&$*4j$$$$$?$7$^$9!%e(B

e$B2!ED$G$9!#e(B

e$B1J0f$5$s!"$@$OC$K$J$C$F$$j$^$9!#e(B

e$BD9$i$/J|CV>uBV$G?=$7Lu$"$j$^$;$s$G$7$?$,!$e(B

e$B$$$($$$(!#e(B

e$B6a$$Fb$K;E>e$2$Fe(B commit e$B$G$-$=$&$G$9!%e(B

e$BN;2r$G$9!#e(B
e$B<j85$N%3!<%I$G%F%9%H$5$;$FD:$-$^$9!#e(B

e$BM#0le(B(?)e$B$NLdBj$Oe(B TkCombobox e$B$,e(B Object e$B%/%i%9>e$GL$Dj5A$N>uBV$Ge(B
TkCombobox e$B$K5!G=DI2C$7$h$&$H$7$Fe(B class TkCombobox e$B$H$7$?>l9g$G$9!%e(B
e$B$3$N>l9g!$?7$7$$%/%i%9$,Dj5A$5$l$F$7$^$$!$4|BTDL$j$K$O$J$j$^$;$s!%e(B

e$B$3$l$O!&!&!&$5$b$"$j$J$s!"$H$$$&5$$,$7$J$$$G$b$J$$$G$9!#e(B
e$B$3$&$$$&%f!<%9%1!<%9$,A[A|=PMh$^$;$s$G$7$?!#e(B

e$B!t$=$&$$$($Pe(B Array
e$B$d$i$K5!G=DI2C$9$k;~$O!"L$Dj5A8!>Z$7$F$$$^$;$s$,!&!&!&e(B

e$B1J0fe(B@e$BCNG=!%6e9)Bg$G$9!%e(B

From: [email protected]
Subject: [ruby-dev:38711] Re: [1.8.7][1.9.1][tk] e$B<+A0<BAu$N3HD%e(B
widget e$B$r;H$$$?$$>l9ge(B
Date: Wed, 24 Jun 2009 10:33:13 +0900
Message-ID: [email protected]

e$B6a$$Fb$K;E>e$2$Fe(B commit e$B$G$-$=$&$G$9!%e(B

e$BN;2r$G$9!#e(B
e$B<j85$N%3!<%I$G%F%9%H$5$;$FD:$-$^$9!#e(B

e$BLdBj$N2U=j$K$D$$$F$O=PMh>e$,$C$?$H;W$$$^$9!%e(B
e$B$G$-$l$P40N;$5$;$?$$$H;W$C$F$$$ke(B BWidget 1.8
e$BBP1~$J$I$,$^$@$J$N$Ge(B
e$B8=;~E@$G$Oe(B commit e$B$O$7$F$$$^$;$s$,!$e(B
e$B8=>u$G$N:9J,%U%!%$%k$rMQ0U$7$^$7$?$N$G$*;n$7$$$?$@$1$^$9$H9,$$$G$9!%e(B

Tk

e$B3HD%$N:G?7%P!<%8%g%s$X$NBP1~0J30$NE@$G$O:n6H40N;$@$H;W$$$^$9!%e(B

Tcl/Tk8,6b1 e$B$X$NBP1~$b40N;$7$F$$$k$D$b$j$G$9!%e(B

Ruby 1.9 e$B$He(B 1.8 e$B$H$G$N%U%!%$%k$N6&DL2=:n6H$N$?$a$Ke(B
e$B:9J,%U%!%$%k$,>/!9Bg$-$/$J$C$F$7$^$$$^$7$?$N$G!$e(B
e$B0J2<$N>l=j$KCV$$$F$$$^$9!%e(B
revision 23917 e$B$+$i$N:9J,$G$9!%e(B

http://www.dumbo.ai.kyutech.ac.jp/~nagai/rbtk19-diff.20090701
http://www.dumbo.ai.kyutech.ac.jp/~nagai/rbtk18-diff.20090701

1.9 e$B$NJ}$Oe(B 6692 e$B9Te(B (207KB)e$B!$e(B1.8 e$B$NJ}$Oe(B 48325

e$B9Te(B (2004KB) e$B$"$j$^$9!%e(B

e$B$J$!$e(Bext/tk/extconf.rb e$B$K$$1$ke(B
Tcl/Tk e$B%i%$%V%i%j$NC5:wG=NO6/2=$b9T$C$F$$$^$9$N$G!$e(B
e$B$^$:$O%*%W%7%g%s$rA4$/M?$($:$Ke(B configure e$B$r<B9Te(B
(–enable-pthread e$B$/$i$$$OI,MW$+$be(B) e$B$7$F$_$F$/$@$5$$!%e(B
e$B%G%U%)%k%H$G$Oe(B ActiveTcl
e$BM%@h$G4hD%$C$FC5$7$F$/$k$H;W$$$^$9!%e(B

e$B$h$m$7$/$*4j$$$$$?$7$^$9!%e(B

e$B1J0fe(B@e$BCNG=!%6e9)Bg$G$9!%e(B

From: [email protected]
Subject: [ruby-dev:38743] Re: [1.8.7][1.9.1][tk] e$B<+A0<BAu$N3HD%e(B
widget e$B$r;H$$$?$$>l9ge(B
Date: Tue, 7 Jul 2009 20:22:48 +0900
Message-ID: [email protected]

e$BH?1~$,0-$/$F?=$7Lu$"$j$^$;$s!#e(B

e$B$$$(!$$=$s$J$3$H$O$"$j$^$;$s!%BgJQ=u$+$C$F$$$^$9!%e(B

e$BD:$$$?:9J,$G$9$,!"e(B
e$B$R$H$^$:e(B 1.8 e$B$K$F@5>oF0:n3NG’$G$-$^$7$?!#e(B

e$BNI$+$C$?!%>/$70B?4$G$-$^$7$?!%e(B(^_^)

RHEL e$B$Ne(B autoconf e$B$,e(B 2.59 e$B$H8E$+$C$?$N$G!“e(B
2.63 e$B$r<h$C$F$-$F;H$$$^$7$?!#e(B
e$B!t$3$l$O$”$^$j4X78$J$$$G$9$M!#e(B

e$B$=$&;W$$$^$9!%e(B

branches/ruby_1_8_7@23917 e$B$@$H?t%U%!%$%k$Ge(B reject e$B$5$l$^$7$?$,!"e(B
e$B$3$N%Q%C%A$NE,MQ$Oe(B 1.8.8 e$B$+$i$K$J$j$^$9$+!)e(B

e$B$I$N%U%!%$%k$Ge(B reject e$B$5$l$?$N$G$7$g$&$+!)e(B
e$B$3$l$^$G$N=$@5$N0lIt$,$^$@%P%C%/%]!<%H$5$l$F$$$J$$$N$+$b$7$l$^$;$s$M!%e(B

e$B$A$J$$K!$e(B1.8.4 e$B0J9$/$i$$$J$i!$e(Bext/tk
e$B0J2<A4BN$r$^$k$^$kCV$-49$($F$be(B
e$BBg>fIW$@$m$&$H$O;W$C$F$^$9!%e(B

e$B8=:_!$e(BRuby/Tk e$B$N99?7:n6H$O40N;$K6aIU$-!$e(B

e$B;D$k$Oe(B BWidget e$B3HD%$N?75,5!G=DI2C$/$i$$$H$$$&>uBV$G$9!%e(B

e$BB>$N4D6-$K$D$$$F$b!"DI$C$F%l%]!<%H$7$^$9!#e(B

e$B$"$j$,$H$&$4$6$$$^$9!%$h$m$7$/$*4j$$$$$?$7$^$9!%e(B

e$B2!ED$G$9!#e(B

e$B>.=P$7$G$9$_$^$;$s!"e(B
e$BF14D6-$K$*$1$ke(B 1.9 (trunk@23917)
e$B$G$b@5>oF0:n$r3NG’$7$^$7$?!#e(B

branches/ruby_1_8_7@23917 e$B$@$H?t%U%!%$%k$Ge(B reject e$B$5$l$^$7$?$,!"e(B
e$B$I$N%U%!%$%k$Ge(B reject e$B$5$l$?$N$G$7$g$&$+!)e(B
e$B$3$l$^$G$N=$@5$N0lIt$,$^$@%P%C%/%]!<%H$5$l$F$$$J$$$N$+$b$7$l$^$;$s$M!%e(B

e$B2~$a$Fe(B branches/ruby_1_8_7
e$B:G?7e(B(23972)e$B$G$d$C$F$_$^$7$?!#e(B

$ find -name “*.rej”
./ext/tk/tcltklib.c.rej
./ext/tk/tkutil/tkutil.c.rej
./ext/tk/lib/tkextlib/version.rb.rej
./ext/tk/lib/tkextlib/blt/tabnotebook.rb.rej
./ext/tk/lib/tk.rb.rej
./ext/tk/sample/demos-jp/msgbox2.rb.rej
./ext/tk/sample/demos-en/msgbox2.rb.rej
./ext/tk/sample/tkcombobox.rb.rej
./ext/tk/extconf.rb.rej

e$BF1MM$Ke(B branches/ruby_1_9_1
e$B:G?7e(B(23845)e$B$@$H2<5-$N$h$&$K$J$j$^$9!#e(B
e$B$3$N$&$Ae(B tkextlib/* e$B$Oe(B “reversed patch detected”
e$B$7$F$$$^$9!#e(B

./ext/tk/lib/tkextlib/tile/tradiobutton.rb.rej
./ext/tk/lib/tkextlib/tile/tlabelframe.rb.rej
./ext/tk/lib/tkextlib/tile/tmenubutton.rb.rej
./ext/tk/lib/tkextlib/tile/tcheckbutton.rb.rej
./ext/tk/lib/tkextlib/tile/tpaned.rb.rej
./ext/tk/lib/tk.rb.rej
./ext/tk/lib/tk/autoload.rb.rej
./ext/tk/lib/tk/checkbutton.rb.rej
./ext/tk/lib/tk/menu.rb.rej
./ext/tk/lib/tk/panedwindow.rb.rej
./ext/tk/lib/tk/ttk_selector.rb.rej
./ext/tk/lib/tk/radiobutton.rb.rej
./ext/tk/sample/tktextframe.rb.rej
./ext/tk/sample/tkballoonhelp.rb.rej
./ext/tk/sample/tkcombobox.rb.rej
./ext/tk/sample/editable_listbox.rb.rej
./ext/tk/sample/tkalignbox.rb.rej
./ext/tk/extconf.rb.rej

e$B$A$J$$K!$e(B1.8.4 e$B0J9$/$i$$$J$i!$e(Bext/tk e$B0J2<A4BN$r$^$k$^$kCV$-49$($F$be(B
e$BBg>fIW$@$m$&$H$O;W$C$F$^$9!%e(B

e$B$J$k$[$I!#e(B
e$B>pJs$"$j$,$H$&$4$6$$$^$9!#e(B
e$BI,MW$K1~$8$F$d$C$F$_$^$9!#e(B

e$BM>CL$K$J$j$^$9$,!#e(B

e$B8D?ME*$K$O!“e(B
1.8.6 e$B$Ne(B REXML e$B$G7k9=$JDK$$L$r8+$F$$$k$3$H$b$”$j!“e(B
stable release e$B$G$N@Q6KE*$9$.$kJQ99$O4?7^$7$+$M$kItJ,$b$”$j$^$9!#e(B

e$B$=$l$HF1$8M}6~$G8@$($P!";d8D?M$O!“e(B
1.8.7 e$B$K:#2s$N=$@5$rF~$l$FD:$/;v$K$OH?BP!”$H!"e(B
e$B<gD%$9$Y$-$J$N$@$H;W$C$F$$$^$9!#e(B

e$B!t$?$H$(!"$=$l$,EvJ}$N%3!<%I$NF0:n$K1F6A$7$J$$$H$7$F$b!#e(B

e$B1J0fe(B@e$BCNG=!%6e9)Bg$G$9!%e(B

From: [email protected]
Subject: [ruby-dev:38748] Re: [1.8.7][1.9.1][tk] e$B<+A0<BAu$N3HD%e(B
widget e$B$r;H$$$?$$>l9ge(B
Date: Wed, 8 Jul 2009 16:07:42 +0900
Message-ID: [email protected]

e$B>.=P$7$G$9$_$^$;$s!"e(B
e$BF14D6-$K$*$1$ke(B 1.9 (trunk@23917) e$B$G$b@5>oF0:n$r3NG’$7$^$7$?!#e(B

e$B=E$M=E$M$"$j$,$H$&$4$6$$$^$9!%e(B

branches/ruby_1_8_7@23917 e$B$@$H?t%U%!%$%k$Ge(B reject e$B$5$l$^$7$?$,!"e(B
e$B$I$N%U%!%$%k$Ge(B reject e$B$5$l$?$N$G$7$g$&$+!)e(B
e$B$3$l$^$G$N=$@5$N0lIt$,$^$@%P%C%/%]!<%H$5$l$F$$$J$$$N$+$b$7$l$^$;$s$M!%e(B

e$B2~$a$Fe(B branches/ruby_1_8_7 e$B:G?7e(B(23972)e$B$G$d$C$F$_$^$7$?!#e(B

e$B$3$A$i$O$H$b$+$/$H$7$Fe(B

e$BF1MM$Ke(B branches/ruby_1_9_1 e$B:G?7e(B(23845)e$B$@$H2<5-$N$h$&$K$J$j$^$9!#e(B

e$B$3$A$i$K$^$G$H$$$&$N$OCfED$5$s$KJQ99$7$F$$$?$@$$$?2U=j$N1F6A$G$7$g$&$M!%e(B
e$B:9J,$Oe(B trunk e$B$KBP$9$k$b$N$G$9$N$G!%e(B

e$BM>CL$K$J$j$^$9$,!#e(B

e$B8D?ME*$K$O!“e(B
1.8.6 e$B$Ne(B REXML e$B$G7k9=$JDK$$L$r8+$F$$$k$3$H$b$”$j!“e(B
stable release e$B$G$N@Q6KE*$9$.$kJQ99$O4?7^$7$+$M$kItJ,$b$”$j$^$9!#e(B

e$B$=$l$HF1$8M}6~$G8@$($P!";d8D?M$O!“e(B
1.8.7 e$B$K:#2s$N=$@5$rF~$l$FD:$/;v$K$OH?BP!”$H!"e(B
e$B<gD%$9$Y$-$J$N$@$H;W$C$F$$$^$9!#e(B

e$B8=::n6HCf$N2~D{$r;d<+?H$,e(B 1.8.7 e$B$KD>@\e(B commit
e$B$9$k$3$H$O$"$j$^$;$s!%e(B
1.8.7 e$B$N%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IB e$B>e$G$NM%@h=g0L$N9b$$>l=j$Ke(B
e$BF0$+$7$?$$%P!<%8%g%s$Ne(B Ruby/Tk e$B$r$^$k$^$kCV$$$F$b$i$($P$$$$$H;W$$$^$9!%e(B

e$B$3$l$bM>CL$K$J$j$^$9$,!"!"!"e(B
RedHat (RHEL / Fedora) e$B$Ne(B Ruby/Tk e$B$O!"e(B
e$B%Q%C%1!<%8>e$OK\BN$H$OJL$K$J$C$F$$$^$9!#e(B

e$B>e5-$N$h$&$J:9$7BX$($rA[Dj$7$?$b$N$G$OL5$$$G$7$g$&$1$l$I!“e(B
e$B$b$7$+$9$k$H!”>-MhE*$K!“e(B
e$B$3$N%Q%C%1!<%8%s%0!&%]%j%7!<$,Lr$KN)$D;v$,$”$k$N$+$J!"e(B
e$B$J$s$F;W$C$?$j$7$^$7$?!#e(B

e$B$5$FK\Bj$G$9!#e(B
Cygwin e$B$G$N7k2L$G$9!#e(B

1.8 e$B$O4|BTDL$j$G$9!#e(B

1.9 e$B$O;DG0$J$,$i4|BTDL$j$G$O$"$j$^$;$s!#e(B
sample/tkcombobox.rb e$B$G$bF1MM$N5sF0$G$"$C$?$?$a!"e(B
e$B$=$A$i$N7k2L$r$*EA$($7$^$9!#e(B

1.9 e$B$G$O!"%N%C%Z%i$JAk$,=P$k$N$_$G8G$^$C$F$7$^$$$^$9!#e(B
e$B%?%$%H%k%P!<$Ne(B [X] e$B%%?%s$G$b=*N;$7$^$;$s!#e(B
C-c e$B$9$k$H2<5-$,=P$F$-$^$9!#e(B

$ ruby ext/tk/sample/tkcombobox.rb
/usr/local/lib/ruby/1.9.1/tk.rb:1363:in _invoke': Interrupt from /usr/local/lib/ruby/1.9.1/tk.rb:1363:inmodule:TkCore
from /usr/local/lib/ruby/1.9.1/tk.rb:1110:in <top (required)>' from ext/tk/sample/tkcombobox.rb:6:inrequire’
from ext/tk/sample/tkcombobox.rb:6:in `’

Cygwin e$B$O!V:#F|IU$N:G?7!W$G$9e(B(^^;

gcc-3.4.4-999
tcltk-20080420-1 (8.4.1)

e$B:r:#e(B Cygwin e$B$OIQHK$K$O2TF/$7$F$$$J$$$N$G$9$,!"e(B
e$B%?%$%_%s%0$,9g$($PF0:n3NG’$9$k$3$H$O2DG=$G$9!#e(B

e$B!tF0:n3NG’MQ$Ke(B Cygwin e$B%[%9%F%#%s%0$,M_$7$$$G$9$M!#e(B
e$B!t8@$$=P$7$?$i%-%j$,$J$$$G$9$,e(B :-p

e$B2!ED$G$9!#e(B

e$B$@$OC$K$J$C$F$$j$^$9!%e(B

e$B$$$($$$(e(B(^^;
e$B$3$A$i$3$=BgJQ$$;$o$K$J$C$F$$j$^$9!#e(B

e$B0J2<$G$O$$$+$,$G$7$g$&$+!)e(B

ext/tk/lib/tk.rb e$B$@$1e(B revert e$B$7$Fe(B patch e$B$7D>$7$^$7$F!“e(B
trunk@23996 e$B$G$N7k2L$O!”$$$<$sF0:n$;$:!"$G$7$F!&!&!&e(B

/usr/local/lib/ruby/1.9.1/tk.rb:1410:in _invoke': Interrupt from /usr/local/lib/ruby/1.9.1/tk.rb:1410:inmodule:TkCore
from /usr/local/lib/ruby/1.9.1/tk.rb:1149:in <top (required)>' from ext/tk/sample/tkcombobox.rb:6:inrequire’
from ext/tk/sample/tkcombobox.rb:6:in `’
Tcl_Release couldn’t find reference for 0x10341550
Aborted (core dumped)

e$B%@%s%WFbMF$O!"!"!">JN,$7$^$9!#e(B

e$B1J0fe(B@e$BCNG=!%6e9)Bg$G$9!%e(B

From: [email protected]
Subject: [ruby-dev:38754] Re: [1.8.7][1.9.1][tk] e$B<+A0<BAu$N3HD%e(B
widget e$B$r;H$$$?$$>l9ge(B
Date: Thu, 9 Jul 2009 16:39:06 +0900
Message-ID: [email protected]

e$B%@%s%WFbMF$O!“!”!">JN,$7$^$9!#e(B

e$B%@%a$G$7$?$+!%e(B(;:wink:
1.9 e$B$J$N$G!$e(Bnative thread
e$BMm$
$NItJ,$@$m$&$H$O;W$&$N$G$9$,!%!%!%e(B

e$B$o$:$+$J2DG=@-$H$7$F!$e(Brequire ‘tk’ e$B$NA0$Ke(B

module TkCore
RUN_EVENTLOOP_ON_MAIN_THREAD = true
end

e$B$r<B9T$9$k$h$&$K$7$F$_$F$$$?$@$1$^$;$s$+!)e(B

Ruby 1.9 e$B$G$3$l$r@Dj$9$k$H!$e(B
Tk.mainloop e$B$Oe(B main thread e$B$G$7$+<B9T$G$-$J$/$J$j$^$9$,e(B
( Thread.new{Tk.mainloop} e$B$O$&$^$/5!G=$7$^$;$se(B )e$B!$e(B
eventloop e$B$He(B nativethread e$B$NMm$
$Ge(B hang up
e$B$7$F$$$k$h$&$J%1!<%9$Oe(B
e$B2sHr$G$-$k2DG=@-$,$"$j$^$9!%e(B

e$B$b$7$3$l$G2sHr$G$-$k$J$i!$e(BCygwin
e$B4D6-$G$O$3$N@_Dj$H$7$F$*$/$3$H$Ge(B
e$BEvLL$N2sHr:v$H$7$?$$$H;W$$$^$9!%e(B
e$B$3$l$G$b%@%a$J$i!$L\A0$OBP1~$,4V$K9g$$$=$&$K$J$$$N$Ge(B
e$B;DG0$J$,$ie(B Cygwin e$B4D6-$G$Ne(B Ruby 1.9 e$B$Ne(B Ruby/Tk
e$B$OHs%5%]!<%He(B
(e$B>/$J$/$H$bEvLL$Oe(B) e$B$H$5$;$F$$$?$@$3$&$H;W$$$^$9!%e(B

e$B1J0fe(B@e$BCNG=!%6e9)Bg$G$9!%e(B

From: [email protected]
Subject: [ruby-dev:38750] Re: [1.8.7][1.9.1][tk] e$B<+A0<BAu$N3HD%e(B
widget e$B$r;H$$$?$$>l9ge(B
Date: Wed, 8 Jul 2009 19:57:43 +0900
Message-ID: [email protected]

e$B2!ED$G$9!#e(B

e$B$@$OC$K$J$C$F$$j$^$9!%e(B

e$B%?%$%H%k%P!<$Ne(B [X] e$B%%?%s$G$b=*N;$7$^$;$s!#e(B
C-c e$B$9$k$H2<5-$,=P$F$-$^$9!#e(B

$ ruby ext/tk/sample/tkcombobox.rb
/usr/local/lib/ruby/1.9.1/tk.rb:1363:in _invoke': Interrupt from /usr/local/lib/ruby/1.9.1/tk.rb:1363:in module:TkCore
from /usr/local/lib/ruby/1.9.1/tk.rb:1110:in <top (required)>' from ext/tk/sample/tkcombobox.rb:6:in require’
from ext/tk/sample/tkcombobox.rb:6:in `’

e$B$!$%!%!%!%e(B
Ruby 1.9 e$B$GI,MW$K$J$ke(B Tcl e$B%$%s%?!<%W%j%?@lMQ%9%l%C%I$,e(B
e$BMn$A$A$c$C$F$$$k$s$G$7$g$&$M!%e(B
e$B0J2<$G$O$$$+$,$G$7$g$&$+!)e(B

— ext/tk/lib/tk.rb (revision 23988)
+++ ext/tk/lib/tk.rb (working copy)
@@ -15,7 +15,9 @@
class TclTkIp

backup original (without encoding) _eval and _invoke

alias _eval_without_enc _eval

  • alias eval _eval
    alias _invoke_without_enc _invoke

  • alias invoke _invoke

    def ip_id

    for RemoteTkIp

@@ -113,17 +115,24 @@
gen_class_name = ruby_class_name
classname_def = ‘’
else # ruby_class == nil

  •  mods = TkExtlibAutoloadModule.find_all{|m| 
    

m.const_defined?(tk_class)}

  •  mods.each{|mod|
    
  •    begin
    
  •      mod.const_get(tk_class)  # auto_load
    
  •      break if (ruby_class = WidgetClassNames[tk_class])
    
  •    rescue LoadError
    
  •      # ignore load error
    
  •    end
    
  •  }
    
  •  if Tk.const_defined?(tk_class)
    
  •    mod.const_get(tk_class)  # auto_load
    
  •    ruby_class = WidgetClassNames[tk_class]
    
  •  end
    
     unless ruby_class
    
  •    mods = TkExtlibAutoloadModule.find_all{|m| 
    

m.const_defined?(tk_class)}

  •    mods.each{|mod|
    
  •      begin
    
  •        mod.const_get(tk_class)  # auto_load
    
  •        break if (ruby_class = WidgetClassNames[tk_class])
    
  •      rescue LoadError
    
  •        # ignore load error
    
  •      end
    
  •    }
    
  •  end
    
  •  unless ruby_class
       std_class = 'Tk' << tk_class
       if Object.const_defined?(std_class)
         Object.const_get(std_class)  # auto_load
    

@@ -131,6 +140,14 @@
end
end

  •  unless ruby_class
    
  •    if Tk.const_defined?('TOPLEVEL_ALIASES') &&
    
  •        Tk::TOPLEVEL_ALIASES.const_defined?(std_class)
    
  •      Tk::TOPLEVEL_ALIASES.const_get(std_class)  # auto_load
    
  •      ruby_class = WidgetClassNames[tk_class]
    
  •    end
    
  •  end
    
  •  if ruby_class
       # found
       ruby_class_name = ruby_class.name
    

@@ -613,11 +630,35 @@
val
end
end

  • private :bool, :number, :string, :num_or_str
  • private :list, :simplelist, :window, :procedure
  • module_function :bool, :number, :num_or_str, :string
  • private :bool, :number, :num_or_str, :num_or_nil, :string

  • private :list, :simplelist, :window, :image_obj, :procedure

  • module_function :bool, :number, :num_or_str, :num_or_nil, :string
    module_function :list, :simplelist, :window, :image_obj, :procedure

  • if (RUBY_VERSION.split(‘.’).map{|n| n.to_i} <=> [1,8,7]) < 0

  • def slice_ary(ary, size)

  •  sliced = []
    
  •  wk_ary = ary.dup
    
  •  until wk_ary.size.zero?
    
  •    sub_ary = []
    
  •    size.times{ sub_ary << wk_ary.shift }
    
  •    yield(sub_ary) if block_given?
    
  •    sliced << sub_ary
    
  •  end
    
  •  (block_given?)? ary: sliced
    
  • end

  • else

  • def slice_ary(ary, size, &b)

  •  if b
    
  •    ary.each_slice(size, &b)
    
  •  else
    
  •    ary.each_slice(size).to_a
    
  •  end
    
  • end

  • end

  • private :slice_ary

  • module_function :slice_ary

  • def subst(str, *opts)

    opts := :nobackslashes | :nocommands | novariables

    tk_call(‘subst’,
    @@ -1130,30 +1171,42 @@
    opts = ‘’
    end

  • if WITH_RUBY_VM ### check Ruby 1.9 !!!
  •  # *** NEED TO FIX ***
    
  •  ip = TclTkIp.new(name, opts)
    
  •  if ip._invoke_without_enc('tk', 'windowingsystem') == 'aqua' &&
    
  •      (TclTkLib.get_version <=> 
    

[8,4,TclTkLib::RELEASE_TYPE::FINAL,9]) > 0

  •    # *** KNOWN BUG ***
    
  •    #   Main event loop thread of TkAqua (> Tk8.4.9) must be the 
    

main

  •    #   application thread. So, ruby1.9 users must call Tk.mainloop 
    

on

  •    #   the main application thread.
    
  •    RUN_EVENTLOOP_ON_MAIN_THREAD = true
    
  •    INTERP = ip
    
  •  else
    
  •    unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD
    
  •      RUN_EVENTLOOP_ON_MAIN_THREAD = false
    
  •    end
    
  •    if RUN_EVENTLOOP_ON_MAIN_THREAD
    
  • unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD
  •  if WITH_RUBY_VM ### check Ruby 1.9 !!!!!!!
    
  •    # *** NEED TO FIX ***
    
  •    ip = TclTkIp.new(name, opts)
    
  •    if ip._invoke_without_enc('tk', 'windowingsystem') == 'aqua' &&
    

(TclTkLib.get_version<=>[8,4,TclTkLib::RELEASE_TYPE::FINAL,6]) > 0

  •      # *** KNOWN BUG ***
    
  •      #   Main event loop thread of TkAqua (> Tk8.4.9) must be the 
    

main

  •      #   application thread. So, ruby1.9 users must call 
    

Tk.mainloop on

  •      #   the main application thread.
    
  •      #
    
  •      # *** ADD (2009/05/10) ***
    
  •      #   In some cases (I don't know the description of 
    

conditions),

  •      #   TkAqua 8.4.7 has a same kind of hang-up trouble.
    
  •      #   So, if 8.4.7 or later, set RUN_EVENTLOOP_ON_MAIN_THREAD 
    

to true.

  •      #   When you want to control this mode, please call the 
    

following

  •      #   (set true/false as you want) before "require 'tk'".
    
  •      # 
    

  •      #   module TkCore; RUN_EVENTLOOP_ON_MAIN_THREAD = true; end
    
  •      # 
    

  •      #
    
  •      RUN_EVENTLOOP_ON_MAIN_THREAD = true
         INTERP = ip
       else
    
  •      ip.delete
    
  •      unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD
    
  •        RUN_EVENTLOOP_ON_MAIN_THREAD = false
    
  •      end
    
  •      if RUN_EVENTLOOP_ON_MAIN_THREAD
    
  •        INTERP = ip
    
  •      else
    
  •        ip.delete
    
  •      end
       end
    
  •  end
    
  •  ip = nil
    
  • else
  •  unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD
    
  •    ip = nil
    
  •  else # Ruby 1.8.x
       RUN_EVENTLOOP_ON_MAIN_THREAD = false
     end
    

    end
    @@ -1183,13 +1236,29 @@
    #sleep

       begin
    
  •      Thread.current[:status].value = TclTkLib.mainloop(true)
    
  •    rescue Exception=>e
    
  •      Thread.current[:status].value = e
    
  •      begin
    
  •        #TclTkLib.mainloop_abort_on_exception = false
    
  •        #Thread.current[:status].value = TclTkLib.mainloop(true)
    
  •        interp.mainloop_abort_on_exception = true
    
  •        Thread.current[:status].value = interp.mainloop(true)
    
  •      rescue SystemExit=>e
    
  •        Thread.current[:status].value = e
    
  •      rescue Exception=>e
    
  •        Thread.current[:status].value = e
    
  •        retry if interp.has_mainwindow?
    
  •      ensure
    
  •        INTERP_MUTEX.synchronize{ INTERP_ROOT_CHECK.broadcast }
    
  •      end
    
  •      #Thread.current[:status].value = TclTkLib.mainloop(false)
    
  •      Thread.current[:status].value = interp.mainloop(false)
    
  •    ensure
    
  •      INTERP_MUTEX.synchronize{ INTERP_ROOT_CHECK.broadcast }
    
  •      # interp must be deleted before the thread for interp is 
    

dead.

  •      # If not, raise Tcl_Panic on Tcl_AsyncDelete because async 
    

handler

  •      # deleted by the wrong thread.
    
  •      interp.delete
       end
    
  •    Thread.current[:status].value = TclTkLib.mainloop(false)
     }
    
     until INTERP_THREAD[:interp]
    

@@ -1321,7 +1390,8 @@
@add_tk_procs.delete_if{|elem|
elem.kind_of?(Array) && elem[0].to_s == name
}

  •    self._invoke('rename', name, '')
    
  •    #self._invoke('rename', name, '')
    
  •    self.__invoke__('rename', name, '')
     }
    

    end
    def INTERP.init_ip_internal
    @@ -1704,11 +1774,14 @@

    elsif TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD
    # if TclTkLib::WINDOWING_SYSTEM == ‘aqua’ &&

  •  if 
    

TkCore::INTERP._invoke_without_enc(‘tk’,‘windowingsystem’)==‘aqua’ &&

  •      Thread.current != Thread.main &&
    
  •      (TclTkLib.get_version <=> 
    

[8,4,TclTkLib::RELEASE_TYPE::FINAL,9]) > 0

  •    raise RuntimeError,
    
  •          "eventloop on TkAqua ( > Tk8.4.9 ) works on the main 
    

thread only"

  •  #if 
    

TkCore::INTERP._invoke_without_enc(‘tk’,‘windowingsystem’)==‘aqua’ &&

  •  #    Thread.current != Thread.main &&
    
  •  #    (TclTkLib.get_version <=> 
    

[8,4,TclTkLib::RELEASE_TYPE::FINAL,9]) > 0

  •  #  raise RuntimeError,
    
  •  #       "eventloop on TkAqua ( > Tk8.4.9 ) works on the main 
    

thread only"

  •  #end
    
  •  if Thread.current != Thread.main
    
  •    raise RuntimeError, "Tk.mainloop is allowed on the main thread 
    

only"
end
TclTkLib.mainloop(check_root)

@@ -3028,7 +3101,7 @@

=begin
if ext_enc_obj == Tk::Encoding::UNKNOWN

  •  if defind? DEFAULT_TK_ENCODING
    
  •  if defined? DEFAULT_TK_ENCODING
       if DEFAULT_TK_ENCODING.kind_of?(::Encoding)
         tk_enc_name    = DEFAULT_TK_ENCODING.name
         tksys_enc_name = DEFAULT_TK_ENCODING.name
    

@@ -3126,7 +3199,7 @@
#if ext_enc_name && ext_enc_name != tksys_enc_name
int_enc_name =
Tk::Encoding::ENCODING_TABLE.get_name(int_enc_obj)
if int_enc_name

  •        # use default_external
    
  •        # use default_internal
           enc_name = int_enc_name
         else
           # use Tk.encoding_system
    

@@ -3279,10 +3352,10 @@
TkFont.init_widget_font(pathname, *__confinfo_cmd)
else
fonts = {}

  •  optkeys.each{|key|
    
  •    key = key.to_s
    
  •    pathname = [win, tag, key].join(';')
    
  •    fonts[key] =
    
  •  optkeys.each{|k|
    
  •    k = k.to_s
    
  •    pathname = [win, tag, k].join(';')
    
  •    fonts[k] =
         TkFont.used_on(pathname) ||
         TkFont.init_widget_font(pathname, *__confinfo_cmd)
     }
    

@@ -3407,7 +3480,7 @@
if fobj.kind_of?(TkFont)
if ltn.kind_of?(TkFont)
conf = {}

  •      ltn.latin_configinfo.each{|key,val| conf[key] = val}
    
  •      ltn.latin_configinfo.each{|k,val| conf[k] = val}
         if keys
           fobj.latin_configure(conf.update(keys))
         else
    

@@ -3467,7 +3540,7 @@
if fobj.kind_of?(TkFont)
if knj.kind_of?(TkFont)
conf = {}

  •      knj.kanji_configinfo.each{|key,val| conf[key] = val}
    
  •      knj.kanji_configinfo.each{|k,val| conf[k] = val}
         if keys
           fobj.kanji_configure(conf.update(keys))
         else
    

@@ -3701,11 +3774,17 @@
val
end

  • def cget_tkstring(option)
  • opt = option.to_s
  • fail ArgumentError, “Invalid option `#{option.inspect}'” if
    opt.length == 0
  • tk_call_without_enc(*(__cget_cmd << “-#{opt}”))
  • end
  • def __cget_core(slot)
    orig_slot = slot
    slot = slot.to_s
  • if slot.length == 0
  • if slot.length == 0
    fail ArgumentError, “Invalid option `#{orig_slot.inspect}'”
    end

@@ -4106,7 +4185,8 @@

       else
         # conf = 

tk_split_list(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd <<
“-#{slot}”))))

  •        conf = tk_split_list(tk_call_without_enc(*(__confinfo_cmd 
    

<< “-#{slot}”)), 0, false, true)

  •        # conf = tk_split_list(tk_call_without_enc(*(__confinfo_cmd 
    

<< “-#{slot}”)), 0, false, true)

  •        conf = tk_split_list(tk_call_without_enc(*(__confinfo_cmd 
    

<< “-#{slot}”)), 1, false, true)
end
conf[__configinfo_struct[:key]] =
conf[__configinfo_struct[:key]][1…-1]
@@ -4296,8 +4376,8 @@
end
}

  •      __methodcall_optkeys.each{|optkey, method|
    
  •        ret << [optkey.to_s, '', '', '', self.__send__(method)]
    
  •      __methodcall_optkeys.each{|optkey, m|
    
  •        ret << [optkey.to_s, '', '', '', self.__send__(m)]
         }
    
         ret
    

@@ -4335,7 +4415,7 @@
if slot
slot = slot.to_s

  •      alias_name, real_name = __optkey_aliases.find{|k, v| k.to_s 
    

== slot}

  •      alias_name, real_name = __optkey_aliases.find{|k,var| k.to_s 
    

== slot}
if real_name
slot = real_name.to_s
end
@@ -4682,8 +4762,8 @@
end
}

  •      __methodcall_optkeys.each{|optkey, method|
    
  •        ret[optkey.to_s] = ['', '', '', self.__send__(method)]
    
  •      __methodcall_optkeys.each{|optkey, m|
    
  •        ret[optkey.to_s] = ['', '', '', self.__send__(m)]
         }
    
         ret
    

@@ -4721,18 +4801,18 @@
“there is a configure alias loop about ‘#{org_slot}’”
else
ret = {}

  •    configinfo().each{|conf|
    
  •    configinfo().each{|cnf|
         if ( ! __configinfo_struct[:alias] \
    
  •          || conf.size > __configinfo_struct[:alias] + 1 )
    
  •        ret[conf[0]] = conf[-1]
    
  •          || cnf.size > __configinfo_struct[:alias] + 1 )
    
  •        ret[cnf[0]] = cnf[-1]
         end
       }
       ret
     end
    
    else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
    ret = {}
  •  configinfo(slot).each{|key, conf|
    
  •    ret[key] = conf[-1] if conf.kind_of?(Array)
    
  •  configinfo(slot).each{|key, cnf|
    
  •    ret[key] = cnf[-1] if cnf.kind_of?(Array)
     }
     ret
    

    end
    @@ -4864,6 +4944,7 @@
    include TkWinfo
    extend TkBindCore
    include Tk::Wm_for_General

  • include Tk::Busy

    @@WIDGET_INSPECT_FULL = false
    def TkWindow.widget_inspect_full?
    @@ -5551,7 +5632,7 @@
    #Tk.freeze

module Tk

  • RELEASE_DATE = ‘2009-01-13’.freeze
  • RELEASE_DATE = ‘2009-07-08’.freeze

    autoload :AUTO_PATH, ‘tk/variable’
    autoload :TCL_PACKAGE_PATH, ‘tk/variable’

e$B2!ED$G$9!#e(B

module TkCore
RUN_EVENTLOOP_ON_MAIN_THREAD = true
end

e$B$3$l$re(B ext/tk/sample/tkcombobox.rb e$B$Ne(B require ‘tk’
e$B$ND>A0$KA^F~$7$?7k2L$G$9!#e(B

/usr/local/lib/ruby/1.9.1/tk.rb:1786: [BUG] Segmentation fault
ruby 1.9.2dev (2009-07-08) [i386-cygwin]

– control frame ----------
c:0005 p:---- s:0017 b:0017 l:000016 d:000016 CFUNC :mainloop
c:0004 p:0120 s:0013 b:0013 l:000012 d:000012 METHOD
/usr/local/lib/ruby/1.9.1/tk.rb:1786
c:0003 p:0404 s:0009 b:0009 l:0005f4 d:001258 EVAL tkcombobox.rb:431
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0005f4 d:0005f4 TOP

tkcombobox.rb:431:in <main>' /usr/local/lib/ruby/1.9.1/tk.rb:1786:in mainloop’
/usr/local/lib/ruby/1.9.1/tk.rb:1786:in `mainloop’

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension
libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted

e$B$3$A$i$GDI$$$+$1$k;v$,$G$-$:!“$9$_$^$;$s!#e(B
e$B$”$^$je(B 1.9 e$B$N;v$rM}2r$7$F$$$J$$$N$G!&!&!&e(B

e$B1J0fe(B@e$BCNG=!%6e9)Bg$G$9!%e(B

From: [email protected]
Subject: [ruby-dev:38759] Re: [1.8.7][1.9.1][tk] e$B<+A0<BAu$N3HD%e(B
widget e$B$r;H$$$?$$>l9ge(B
Date: Fri, 10 Jul 2009 14:45:40 +0900
Message-ID: [email protected]

/usr/local/lib/ruby/1.9.1/tk.rb:1786: [BUG] Segmentation fault
ruby 1.9.2dev (2009-07-08) [i386-cygwin]

e$B$4$a$s$J$5$$!%e(B
e$B4D6-$r=`Hw$9$k;~4V$,$J$/!$7k6I!$8=;~E@$G$O860x$,$o$+$j$^$;$s$G$7$?!%e(B
e$B;EJ}$J$/!$e(BCygwin e$B4D6-$G%@%a$J>u67$Oe(B known bug e$B$H$7$F!$e(B
trunk e$B$He(B ruby_1_8 e$B$H$Ke(B commit e$B$7$^$7$?!%e(B

e$B$3$A$i$GDI$$$+$1$k;v$,$G$-$:!“$9$_$^$;$s!#e(B
e$B$”$^$je(B 1.9 e$B$N;v$rM}2r$7$F$$$J$$$N$G!&!&!&e(B

e$B>/$J$/$H$b!$D4$Y$M$P$J$i$J$$Aj<j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I!$8=;~E@$G$O860x$,$o$+$j$^$;$s$G$7$?!%e(B

e$B$*NO$K$J$l$:!"$9$_$^$;$s$G$9!#!#!#e(B

e$B$=$N:]!$$?$H$(:3:Y$J>pJs$G$b2r7h$N;e8}$K$J$k2DG=@-$,$"$j$^$9$N$G!$e(B
e$B2?$+$*5$IU$-$NE@$,$"$l$P!$5$7Z$KJs9p$$$?$@$1$^$9$H=u$+$j$^$9!%e(B

e$B$O$$!“2?$+5$IU$$$?;v$,$”$l$P$4O"MmCW$7$^$9!#e(B

e$B$=$&$$$($P!&!&!&e(B
Windows e$B$G$Ne(B Cygwin : Native (MSWin32, etc)
e$BHfN($C$F$I$N$/$i$$$J$N$G$7$g$&!#e(B
e$B$=$&$$$C$?>pJs$O$"$k$G$7$g$&$+!#e(B
e$B3N$+e(B Cygwin e$B$O%a%s%F%J$rJg=8$5$l$F$$$?$h$&$J!&!&!&e(B
e$B$=$&$$$&0UL#$G$O>/?tGI$J$N$G$7$g$&$+!#e(B

e$B2!ED$G$9!#e(B

Bug #1774 e$B$N7o!"e(Bruby-dev:38792 e$B$Ge(B

mingwe$B$de(Bcygwine$B$O$3$3?tG/8+$F$^$;$se(B…

e$B$H$"$j$^$7$?$N$G!“e(Btrunk@24117 e$B$re(B Cygwin e$B$Ge(B make
e$B$7$F$_$?$N$G$9!#e(B
e$B!t$=$l$O$=$l$G!”$"$A$i$K%l%9$7$h$&$H;W$$$^$9!#e(B

e$B$=$&$7$?$i!"!"!"F0$$$F$7$^$$$^$7$?e(B(^^;

ruby e$B$Oe(B trunk@24117 e$BAG$N>uBV$G!"e(B
ext/tk/sample/tkcombobox.rb e$B$K$Oe(B ruby-dev:38755 e$B$N%Q%C%A!“e(B
e$B”-$r=<$F$?>uBV$G$9!#e(B

module TkCore
RUN_EVENTLOOP_ON_MAIN_THREAD = true
end

e$B%Q%C%A$r=<$F$J$$e(B tkcombobox.rb e$B$O!"e(B
e$BA02s$HF1MM$K8G$^$C$F$7$^$$$^$9!#e(B

e$B$3$l$G!“0l7oMnCe!”$G$7$g$&$+!)e(B(^^;