diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-08-24 08:21:56 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-08-24 08:21:56 +0000 |
commit | a1b57d0add85a248666fb55c58aa8c0c772136fc (patch) | |
tree | 3d30e530b29103ce2884dff782592ddf7292f4df /ext/tk/lib/tkcanvas.rb | |
parent | a281c996689240dc204f0c534cfe21ee6cbb6863 (diff) |
1.4.1 to be
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tkcanvas.rb')
-rw-r--r-- | ext/tk/lib/tkcanvas.rb | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/ext/tk/lib/tkcanvas.rb b/ext/tk/lib/tkcanvas.rb index 1cf24eeb7b..40bfa54846 100644 --- a/ext/tk/lib/tkcanvas.rb +++ b/ext/tk/lib/tkcanvas.rb @@ -131,7 +131,7 @@ class TkCanvas<TkWindow include TkTreatCItemFont WidgetClassName = 'Canvas'.freeze - TkClassBind::WidgetClassNameTBL[WidgetClassName] = self + WidgetClassNames[WidgetClassName] = self def self.to_eval WidgetClassName end @@ -179,31 +179,15 @@ class TkCanvas<TkWindow end def itembind(tag, context, cmd=Proc.new, args=nil) - id = install_bind(cmd, args) - begin - tk_send 'bind', tagid(tag), "<#{tk_event_sequence(context)}>", id - rescue - uninstall_cmd(cmd) - fail - end - # @cmdtbl.push id + _bind([path, "bind", tagid(tag)], context, cmd, args) + end + + def itembind_append(tag, context, cmd=Proc.new, args=nil) + _bind_append([path, "bind", tagid(tag)], context, cmd, args) end def itembindinfo(tag, context=nil) - if context - (tk_send('bind', tagid(tag), - "<#{tk_event_sequence(context)}>")).collect{|cmdline| - if cmdline =~ /^rb_out (c\d+)\s+(.*)$/ - [Tk_CMDTBL[$1], $2] - else - cmdline - end - } - else - tk_split_list(tk_send 'bind', tagid(tag)).filter{|seq| - seq[1..-2].gsub(/></,',') - } - end + _bindinfo([path, "bind", tagid(tag)], context) end def canvasx(x, *args) |