diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-23 07:57:39 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-23 07:57:39 +0000 |
commit | 223798c50efcabab4ffa17e4060a8d89c929f982 (patch) | |
tree | e3e3914e2c715592a6d00b32dfb98af03293b52c /ext/tk/lib/tk/canvastag.rb | |
parent | 258f9f49d6ca3946a8e08f207eb8ee2b4b51c6b3 (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/canvastag.rb')
-rw-r--r-- | ext/tk/lib/tk/canvastag.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/tk/lib/tk/canvastag.rb b/ext/tk/lib/tk/canvastag.rb index 1719abfa02..a5650ee68b 100644 --- a/ext/tk/lib/tk/canvastag.rb +++ b/ext/tk/lib/tk/canvastag.rb @@ -13,7 +13,7 @@ require 'tk/canvas' module TkcTagAccess def addtag(tag) - @c.addtag(tag, 'with', @id) + @c.addtag(tag, 'withtag', @id) self end @@ -93,6 +93,7 @@ module TkcTagAccess @c.dtag(@id, tag_to_del) self end + alias deltag dtag def find @c.find('withtag', @id) @@ -351,20 +352,23 @@ class TkcGroup<TkcTag CTagID_TBL[@cpath] = {} unless CTagID_TBL[@cpath] CTagID_TBL[@cpath][@id] = self Tk_cGroup_ID[1].succ! - add(*args) if args != [] + include(*args) if args != [] end #private :create_self def include(*tags) for i in tags - i.addtag(@id) + #i.addtag(@id) + @c.addtag_withtag(@id, i) end self end + alias add include def exclude(*tags) for i in tags - i.delete(@id) + #i.dtag(@id) + @c.dtag(i, @id) end self end |