summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk/canvas.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-06-23 07:57:39 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-06-23 07:57:39 +0000
commit223798c50efcabab4ffa17e4060a8d89c929f982 (patch)
treee3e3914e2c715592a6d00b32dfb98af03293b52c /ext/tk/lib/tk/canvas.rb
parent258f9f49d6ca3946a8e08f207eb8ee2b4b51c6b3 (diff)
* ext/tk/lib/tk/canvastag.rb: TkcGroup.new cannot include given items.
TkcGroup#exclude calls wrong method. Add alias TkcGroup#add [ruby-talk:146049]. * ext/tk/lib/tk/canvas.rb: TkCanvas#dtag and some subcommands of TkCanvas#addtag fail to treat a TkcTag argument. * ext/tk/lib/tk/event.rb: add TkEvent::Event#generate to help to send current event to other widgets. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk/canvas.rb')
-rw-r--r--ext/tk/lib/tk/canvas.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/tk/lib/tk/canvas.rb b/ext/tk/lib/tk/canvas.rb
index 24dfe04b08..9d7dcbff78 100644
--- a/ext/tk/lib/tk/canvas.rb
+++ b/ext/tk/lib/tk/canvas.rb
@@ -64,6 +64,10 @@ class TkCanvas<TkWindow
def addtag(tag, mode, *args)
+ mode = mode.to_s
+ if args[0] && mode =~ /^(above|below|with(tag)?)$/
+ args[0] = tagid(args[0])
+ end
tk_send_without_enc('addtag', tagid(tag), mode, *args)
self
end
@@ -173,9 +177,10 @@ class TkCanvas<TkWindow
alias remove delete
def dtag(tag, tag_to_del=None)
- tk_send_without_enc('dtag', tagid(tag), tag_to_del)
+ tk_send_without_enc('dtag', tagid(tag), tagid(tag_to_del))
self
end
+ alias deltag dtag
def find(mode, *args)
list(tk_send_without_enc('find', mode, *args)).collect!{|id|