diff options
Diffstat (limited to 'ext/tk/lib/tkafter.rb')
-rw-r--r-- | ext/tk/lib/tkafter.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/tk/lib/tkafter.rb b/ext/tk/lib/tkafter.rb index a75ad5a237..fec93a6a04 100644 --- a/ext/tk/lib/tkafter.rb +++ b/ext/tk/lib/tkafter.rb @@ -12,15 +12,19 @@ class TkTimer Tk_CBID = [0] Tk_CBTBL = {} - TkComm::INITIALIZE_TARGETS << self + # this constant must be defined befor calling __add_target_for_init__ + TkINTERP_SETUP_SCRIPTS = [ + ["proc", "rb_after", "id", + "ruby [format \"#{self.name}.callback %%Q!%s!\" $id]"] + ] + + TkComm.__add_target_for_init__(self) def self.__init_tables__ # cannot clear # Tcl interpreter may keep callbacks end - INTERP._invoke("proc", "rb_after", "id", - "ruby [format \"#{self.name}.callback %%Q!%s!\" $id]") ############################### # class methods |