summaryrefslogtreecommitdiff
path: root/ext/tcltklib/sample
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-31 04:34:35 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-31 04:34:35 +0000
commit7814a68ac62ebfbbe2e025a473ff64ec9a5641b5 (patch)
tree248da2b1ecfa4a5dfc9ea06cdc73e80ca0229a15 /ext/tcltklib/sample
parent6cb5382aaafe510e0d88187020c3426a56ae0e30 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tcltklib/sample')
-rw-r--r--ext/tcltklib/sample/sample2.rb12
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,