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:55 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-30 08:44:55 +0000
commita50a6582ff34aabe45a97530a127b52a9ad53511 (patch)
tree08e9410ac38b9d3a2780f4ebca96bfc6edeb7a2a /ext/tk/sample/tkextlib/tktable
parenta937ea5c991407a49ef39947b68c3c39992a5f35 (diff)
* ext/tcltklib/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/branches/ruby_1_8@8213 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,