mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/tk/lib/tk.rb: Tk.after makes TkCore::INTERP.tk_cmd_tbl grow [ruby-dev:24207]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0a054a5fd8
commit
7cf8256075
2 changed files with 19 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Sep 3 11:31:44 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
|
* ext/tk/lib/tk.rb: Tk.after makes TkCore::INTERP.tk_cmd_tbl grow
|
||||||
|
[ruby-dev:24207]
|
||||||
|
|
||||||
Fri Sep 3 02:12:48 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
Fri Sep 3 02:12:48 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
* ext/tcltklib/tcltklib.c: fix typo [ruby-talk:111266]
|
* ext/tcltklib/tcltklib.c: fix typo [ruby-talk:111266]
|
||||||
|
|
|
@ -1191,8 +1191,14 @@ module TkCore
|
||||||
end
|
end
|
||||||
|
|
||||||
def after(ms, cmd=Proc.new)
|
def after(ms, cmd=Proc.new)
|
||||||
|
crit_bup = Thread.critical
|
||||||
|
Thread.critical = true
|
||||||
|
|
||||||
myid = _curr_cmd_id
|
myid = _curr_cmd_id
|
||||||
cmdid = install_cmd(cmd)
|
cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(myid); ret})
|
||||||
|
|
||||||
|
Thread.critical = crit_bup
|
||||||
|
|
||||||
tk_call_without_enc("after",ms,cmdid) # return id
|
tk_call_without_enc("after",ms,cmdid) # return id
|
||||||
# return
|
# return
|
||||||
# if false #defined? Thread
|
# if false #defined? Thread
|
||||||
|
@ -1209,8 +1215,14 @@ module TkCore
|
||||||
end
|
end
|
||||||
|
|
||||||
def after_idle(cmd=Proc.new)
|
def after_idle(cmd=Proc.new)
|
||||||
|
crit_bup = Thread.critical
|
||||||
|
Thread.critical = true
|
||||||
|
|
||||||
myid = _curr_cmd_id
|
myid = _curr_cmd_id
|
||||||
cmdid = install_cmd(cmd)
|
cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(myid); ret})
|
||||||
|
|
||||||
|
Thread.critical = crit_bup
|
||||||
|
|
||||||
tk_call_without_enc('after','idle',cmdid)
|
tk_call_without_enc('after','idle',cmdid)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue