From 278b96ff97878af2ee4281596214f396cd57d00f Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Tue, 17 Apr 2001 15:35:46 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'v1_6_4_preview2'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_6_4_preview2@1327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/lib/tkvirtevent.rb | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'ext/tk/lib/tkvirtevent.rb') diff --git a/ext/tk/lib/tkvirtevent.rb b/ext/tk/lib/tkvirtevent.rb index b31b99062f..d3721e362e 100644 --- a/ext/tk/lib/tkvirtevent.rb +++ b/ext/tk/lib/tkvirtevent.rb @@ -7,12 +7,27 @@ require 'tk' class TkVirtualEvent") + PreDefVirtEvent.new(event) + else + fail ArgumentError, "undefined virtual event '<#{event}>'" + end + end end def TkVirtualEvent.info @@ -22,8 +37,8 @@ class TkVirtualEvent", TkVirturlEventID[0]) - TkVirturlEventID[0] += 1 + @path = @id = format("", TkVirtualEventID[0]) + TkVirtualEventID[0] += 1 add(*sequences) end @@ -31,7 +46,7 @@ class TkVirtualEvent", *(sequences.collect{|seq| "<#{tk_event_sequence(seq)}>"}) ) - TkVirturlEventTBL[@id] = self + TkVirtualEventTBL[@id] = self end self end @@ -39,11 +54,11 @@ class TkVirtualEvent") - TkVirturlEventTBL[@id] = nil + TkVirtualEventTBL[@id] = nil else tk_call('event', 'delete', "<#{@id}>", *(sequences.collect{|seq| "<#{tk_event_sequence(seq)}>"}) ) - TkVirturlEventTBL[@id] = nil if info == [] + TkVirtualEventTBL[@id] = nil if info == [] end self end -- cgit v1.2.3