From a1b57d0add85a248666fb55c58aa8c0c772136fc Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 24 Aug 1999 08:21:56 +0000 Subject: 1.4.1 to be git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/lib/tktext.rb | 65 +++++++++------------------------------------------- 1 file changed, 11 insertions(+), 54 deletions(-) (limited to 'ext/tk/lib/tktext.rb') diff --git a/ext/tk/lib/tktext.rb b/ext/tk/lib/tktext.rb index 324af90f85..83999cb3e2 100644 --- a/ext/tk/lib/tktext.rb +++ b/ext/tk/lib/tktext.rb @@ -129,7 +129,7 @@ class TkText", mode + id - # _addcmd cmd - end - private :_tag_bind_core - def tag_bind(tag, seq, cmd=Proc.new, args=nil) - _tag_bind_core('', tag, seq, cmd, args=nil) + _bind(['tag', 'bind', tag], seq, cmd, args) end def tag_bind_append(tag, seq, cmd=Proc.new, args=nil) - _tag_bind_core('+', tag, seq, cmd, args=nil) + _bind_append(['tag', 'bind', tag], seq, cmd, args) end def tag_bindinfo(tag, context=nil) - if context - (tk_send('tag', 'bind', 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('tag', 'bind', tag)).filter{|seq| - seq[1..-2].gsub(/>", id - # @t._addcmd cmd + _bind([@t.path, 'tag', 'bind', @id], seq, cmd, args) + end + + def bind_append(seq, cmd=Proc.new, args=nil) + _bind_append([@t.path, 'tag', 'bind', @id], seq, cmd, args) end def bindinfo(context=nil) - if context - (tk_call(@t.path, 'tag', 'bind', @id, - "<#{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_call(@t.path, 'tag', 'bind', @id)).filter{|seq| - seq[1..-2].gsub(/>