summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-11 03:45:25 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-11 03:45:25 +0000
commit59e126383cc1a2bbbb7acf16bab904c6cff8a380 (patch)
tree93e6475e66c1a36713e1932904c52b6e27c4e7f6 /ext
parent2697c924a96f6926fcc878ae8ce9750670ec0007 (diff)
* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb,
ext/tk/sample/tkextlib/tile/demo.rb: previous patch is not complete. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/tk/lib/tkextlib/tile.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/style.rb15
2 files changed, 13 insertions, 3 deletions
diff --git a/ext/tk/lib/tkextlib/tile.rb b/ext/tk/lib/tkextlib/tile.rb
index 76d22812ac..b6beb8a11e 100644
--- a/ext/tk/lib/tkextlib/tile.rb
+++ b/ext/tk/lib/tkextlib/tile.rb
@@ -137,6 +137,7 @@ module Tk
# do nothing !!!
warn "Warning: can't define '#{cmd}' command (already exist)" if $DEBUG
+ next
end
TkNamespace.eval(ns){
TkCore::INTERP.add_tk_procs(proc_name, 'imgdir {patterns {*.gif}}',
diff --git a/ext/tk/lib/tkextlib/tile/style.rb b/ext/tk/lib/tkextlib/tile/style.rb
index 56a7f35180..098f4e4f72 100644
--- a/ext/tk/lib/tkextlib/tile/style.rb
+++ b/ext/tk/lib/tkextlib/tile/style.rb
@@ -39,6 +39,7 @@ class << Tk::Tile::Style
# do nothing !!!
warn "Warning: can't define '::ttk::style' command (already exist)" if $DEBUG
+ return
end
TkCore::INTERP.add_tk_procs('::ttk::style', 'args', <<-'EOS')
if [string equal [lrange $args 0 1] {element create}] {
@@ -59,8 +60,12 @@ class << Tk::Tile::Style
else ### TILE_SPEC_VERSION_ID == 7
def __define_wrapper_proc_for_compatibility__!
unless Tk.info(:commands, '::ttk::style').empty?
- fail RuntimeError,
- "can't define ':ttk::style' command (already exist)"
+ # fail RuntimeError,
+ # "can't define '::ttk::style' command (already exist)"
+
+ # do nothing !!!
+ warn "Warning: can't define '::ttk::style' command (already exist)" if $DEBUG
+ return
end
TkCore::INTERP.add_tk_procs('::ttk::style', 'args', <<-'EOS')
if [string equal [lrange $args 0 1] {element create}] {
@@ -87,7 +92,11 @@ class << Tk::Tile::Style
def __define_wrapper_proc_for_compatibility__!
unless Tk.info(:commands, '::style').empty?
- fail RuntimeError, "can't define '::style' command (already exist)"
+ # fail RuntimeError, "can't define '::style' command (already exist)"
+
+ # do nothing !!!
+ warn "Warning: can't define '::style' command (already exist)" if $DEBUG
+ return
end
TkCore::INTERP.add_tk_procs('::style', 'args', <<-'EOS')
if [string equal [lrange $args 0 1] {element create}] {