From 44a6d5b6d0eccbf3f748a92ca6d4062baf9342f5 Mon Sep 17 00:00:00 2001 From: nagai Date: Mon, 31 Jan 2005 04:34:35 +0000 Subject: * ext/tcltklib/tcltklib.c: add invalid namespace check * ext/tk/lib/multi-tk.rb: add invalid_namespace? method * ext/tk/lib/remote-tk.rb: ditto git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tcltklib/sample/sample2.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'ext/tcltklib/sample') diff --git a/ext/tcltklib/sample/sample2.rb b/ext/tcltklib/sample/sample2.rb index 5d43470de..444bb1eef 100644 --- a/ext/tcltklib/sample/sample2.rb +++ b/ext/tcltklib/sample/sample2.rb @@ -19,7 +19,7 @@ require "tcltk" $ip = TclTkInterpreter.new() $root = $ip.rootwidget() $button, $canvas, $checkbutton, $frame, $label, $pack, $update, $wm = - $ip.commands().indexes( + $ip.commands().values_at( "button", "canvas", "checkbutton", "frame", "label", "pack", "update", "wm") class Othello @@ -196,10 +196,12 @@ class Othello def initialize(view, row, col) @view = view - @id = @view.e("create rectangle", *view.tk_rect(view.left + col, - view.top + row, - view.left + col + 1, - view.top + row + 1)) + @id = @view.e("create rectangle", + *(view.tk_rect(view.left + col, + view.top + row, + view.left + col + 1, + view.top + row + 1) \ + << "-fill #{BACK_GROUND_COLOR}") ) @row = row @col = col @view.e("itemconfigure", @id, -- cgit