summaryrefslogtreecommitdiffstats
path: root/ext/tk/sample/tkextlib/tktable
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-30 08:44:19 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-30 08:44:19 +0000
commitbbcbe0b7e5d5969d6a55cc885a323107e415ce44 (patch)
tree760e0cf10c7c7083f6f784f16b602dd562214dd6 /ext/tk/sample/tkextlib/tktable
parent2f50816ad9df366072d9a72a590180b2a78d07c2 (diff)
downloadruby-bbcbe0b7e5d5969d6a55cc885a323107e415ce44.tar.gz
ruby-bbcbe0b7e5d5969d6a55cc885a323107e415ce44.tar.xz
ruby-bbcbe0b7e5d5969d6a55cc885a323107e415ce44.zip
* ext/tk/tcltklib.c: add TclTkIp#_create_console() method to create
a Tcl/Tk's console window. * ext/tk/lib/multi-tk.rb: support TclTkIp#_create_console() method. * ext/tk/lib/remote-tk.rb: ditto. * ext/tk/lib/tk/console.rb: ditto. * ext/tk/lib/tk.rb: update RELEASE_DATE * ext/tk/sample/demo-*/check2.rb: use 'return' in the Proc object. * ext/tk/sample/tkextlib/**: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/tkextlib/tktable')
-rw-r--r--ext/tk/sample/tkextlib/tktable/basic.rb4
-rw-r--r--ext/tk/sample/tkextlib/tktable/command.rb4
-rw-r--r--ext/tk/sample/tkextlib/tktable/debug.rb2
-rw-r--r--ext/tk/sample/tkextlib/tktable/maxsize.rb2
4 files changed, 6 insertions, 6 deletions
diff --git a/ext/tk/sample/tkextlib/tktable/basic.rb b/ext/tk/sample/tkextlib/tktable/basic.rb
index ece46b318..0d2d48893 100644
--- a/ext/tk/sample/tkextlib/tktable/basic.rb
+++ b/ext/tk/sample/tkextlib/tktable/basic.rb
@@ -29,11 +29,11 @@ table = Tk::TkTable.new(:rows=>rows, :cols=>cols, :variable=>ary,
:rowstretchmode=>:last, :colstretchmode=>:last,
:rowtagcommand=>proc{|row|
row = Integer(row)
- return 'OddRow' if row>0 && row%2 == 1
+ (row>0 && row%2 == 1)? 'OddRow': ''
},
:coltagcommand=>proc{|col|
col = Integer(col)
- return 'OddCol' if col>0 && col%2 == 1
+ (col>0 && col%2 == 1)? 'OddCol': ''
},
:selectmode=>:extended, :sparsearray=>false)
diff --git a/ext/tk/sample/tkextlib/tktable/command.rb b/ext/tk/sample/tkextlib/tktable/command.rb
index eb9ddffb7..bf36159cc 100644
--- a/ext/tk/sample/tkextlib/tktable/command.rb
+++ b/ext/tk/sample/tkextlib/tktable/command.rb
@@ -45,11 +45,11 @@ table = Tk::TkTable.new(:rows=>rows, :cols=>cols,
:rowstretchmode=>:last, :colstretchmode=>:last,
:rowtagcommand=>proc{|row|
row = Integer(row)
- return 'OddRow' if row>0 && row%2 == 1
+ (row>0 && row%2 == 1)? 'OddRow': ''
},
:coltagcommand=>proc{|col|
col = Integer(col)
- return 'OddCol' if col>0 && col%2 == 1
+ (col>0 && col%2 == 1)? 'OddCol': ''
},
:selectmode=>:extended, :flashmode=>true,
:rowstretch=>:unset, :colstretch=>:unset,
diff --git a/ext/tk/sample/tkextlib/tktable/debug.rb b/ext/tk/sample/tkextlib/tktable/debug.rb
index 3200c1c77..d5cd5e49b 100644
--- a/ext/tk/sample/tkextlib/tktable/debug.rb
+++ b/ext/tk/sample/tkextlib/tktable/debug.rb
@@ -29,7 +29,7 @@ table = Tk::TkTable.new(:rows=>rows, :cols=>cols, :variable=>ary,
:roworigin=>-5, :colorigin=>-2,
:coltagcommand=>proc{|col|
col = Integer(col)
- return 'OddCol' if col>0 && col%2 == 1
+ (col>0 && col%2 == 1)? 'OddCol': ''
},
:selectmode=>:extended, :flashmode=>true,
:rowstretch=>:unset, :colstretch=>:unset,
diff --git a/ext/tk/sample/tkextlib/tktable/maxsize.rb b/ext/tk/sample/tkextlib/tktable/maxsize.rb
index c9ca745ee..aff68ff37 100644
--- a/ext/tk/sample/tkextlib/tktable/maxsize.rb
+++ b/ext/tk/sample/tkextlib/tktable/maxsize.rb
@@ -28,7 +28,7 @@ table = Tk::TkTable.new(:rows=>rows, :cols=>cols, :variable=>ary,
:titlerows=>1, :titlecols=>1,
:coltagcommand=>proc{|col|
col = Integer(col)
- return 'OddCol' if col>0 && col%2 == 1
+ (col>0 && col%2 == 1)? 'OddCol': ''
},
:selectmode=>:extended,
:colstretch=>:unset, :rowstretch=>:unset,