diff options
Diffstat (limited to 'ext/tcltklib/sample/sample2.rb')
-rw-r--r-- | ext/tcltklib/sample/sample2.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/tcltklib/sample/sample2.rb b/ext/tcltklib/sample/sample2.rb index 5d43470de3..444bb1eef7 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, |