From: Hidetoshi NAGAI Date: 2004-12-21T12:26:17+09:00 Subject: Re: [Tk] grid manager with '-', 'x', '^' Hi, From: Hidetoshi NAGAI Subject: Re: [Tk] grid manager with '-', 'x', '^' Date: Tue, 21 Dec 2004 10:26:06 +0900 Message-ID: <20041221.102605.41653851.nagai@ai.kyutech.ac.jp> > I'll make patch for Tcl/Tk8.3 later. Please wait for it. I'd applied the following patch. But I cannot rescue the bug on "TkGrid.configure( c , 'x', '^', :sticky=>'news')", because Tcl/Tk8.3 cannot accept both of "grid .c x ^ " and "grid configure .c x ^ ". That is a bug on Tcl/Tk8.3. The cost to rescue the bugs is probably too large. Please take that is a constraint of using Tcl/Tk8.3. ------------------------------------------------------------- Index: ext/tk/lib/tk/grid.rb =================================================================== RCS file: /var/cvs/src/ruby/ext/tk/lib/tk/grid.rb,v retrieving revision 1.1.2.4 diff -u -r1.1.2.4 grid.rb --- ext/tk/lib/tk/grid.rb 11 Oct 2004 04:51:07 -0000 1.1.2.4 +++ ext/tk/lib/tk/grid.rb 21 Dec 2004 03:07:47 -0000 @@ -42,7 +42,16 @@ params.push("-#{k}") params.push((v.kind_of?(TkObject))? v.epath: v) } - tk_call_without_enc("grid", 'configure', *params) + if Tk::TCL_MAJOR_VERSION < 8 || + (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION <= 3) + if params[0] == '-' || params[0] == 'x' || params[0] == '^' + tk_call_without_enc('grid', *params) + else + tk_call_without_enc('grid', 'configure', *params) + end + else + tk_call_without_enc('grid', 'configure', *params) + end end alias grid configure ------------------------------------------------------------- -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)