summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk/timer.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-09 19:29:29 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-09 19:29:29 +0000
commit24d2225afde5beb0771c8987c2e1c80ce900b52a (patch)
tree5e84584302570f87a94a98d9c30e1ca67e270a55 /ext/tk/lib/tk/timer.rb
parent703f913426357ca462c0d82336bdb1f193e5e879 (diff)
* ext/tk/lib/tk.rb: better operation for SIGINT when processing callbacks.
* ext/tk/lib/tk/msgcat.rb: ditto. * ext/tk/lib/tk/variable.rb: ditto. * ext/tk/lib/tk/timer.rb: ditto. * ext/tk/lib/tk/validation.rb: add Tk::ValidateConfigure.__def_validcmd() to define validatecommand methods easier git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk/timer.rb')
-rw-r--r--ext/tk/lib/tk/timer.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/tk/lib/tk/timer.rb b/ext/tk/lib/tk/timer.rb
index 3696de1..fa0a582 100644
--- a/ext/tk/lib/tk/timer.rb
+++ b/ext/tk/lib/tk/timer.rb
@@ -61,11 +61,16 @@ class TkTimer
@in_callback = true
begin
@return_value = @current_proc.call(self)
+ rescue SystemExit
+ exit(0)
+ rescue Interrupt
+ exit!(1)
rescue Exception => e
if @cancel_on_exception &&
@cancel_on_exception.find{|exc| e.kind_of?(exc)}
cancel
@return_value = e
+ @in_callback = false
return e
else
fail e