start Tk which depends on MultiTkIp
#<RDoc::Comment:0x00000001424d60>
#<RDoc::Comment:0x0000000175a4d0>
#<RDoc::Comment:0x00000002009270>
#<RDoc::Comment:0x000000021ceab0>
#<RDoc::Comment:0x000000020ef2e8>
#<RDoc::Comment:0x00000001b14b48>
#<RDoc::Comment:0x0000000109fa28>
#<RDoc::Comment:0x000000012b81c0>
#<RDoc::Comment:0x00000001b61b28>
#<RDoc::Comment:0x0000000202b410>
#<RDoc::Comment:0x00000001453d90>
#<RDoc::Comment:0x00000002169f98>
#<RDoc::Comment:0x0000000105b8a0>
*** KNOWN BUG ***
Main event loop thread of TkAqua (> Tk8.4.9) must be the main application thread. So, ruby1.9 users must call Tk.mainloop on the main application thread.
# File tk/lib/tk.rb, line 1438
def TkCore.callback(*arg)
begin
if TkCore::INTERP.tk_cmd_tbl.kind_of?(Hash)
#TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg)
normal_ret = false
ret = catch(:IRB_EXIT) do # IRB hack
retval = TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg)
normal_ret = true
retval
end
unless normal_ret
# catch IRB_EXIT
exit(ret)
end
ret
end
rescue SystemExit=>e
exit(e.status)
rescue Interrupt=>e
fail(e)
rescue Exception => e
begin
msg = _toUTF8(e.class.inspect) + ': ' +
_toUTF8(e.message) + "\n" +
"\n---< backtrace of Ruby side >-----\n" +
_toUTF8(e.backtrace.join("\n")) +
"\n---< backtrace of Tk side >-------"
if TkCore::WITH_ENCODING
msg.force_encoding('utf-8')
else
msg.instance_variable_set(:@encoding, 'utf-8')
end
rescue Exception
msg = e.class.inspect + ': ' + e.message + "\n" +
"\n---< backtrace of Ruby side >-----\n" +
e.backtrace.join("\n") +
"\n---< backtrace of Tk side >-------"
end
# TkCore::INTERP._set_global_var('errorInfo', msg)
# fail(e)
fail(e, msg)
end
end
# File tk/lib/tk.rb, line 1248
def call(*args)
@ip.cb_eval(@cmd, *args)
end
# File tk/lib/tk.rb, line 1426
def callback_break
fail TkCallbackBreak, "Tk callback returns 'break' status"
end
# File tk/lib/tk.rb, line 1430
def callback_continue
fail TkCallbackContinue, "Tk callback returns 'continue' status"
end
# File tk/lib/tk.rb, line 1434
def callback_return
fail TkCallbackReturn, "Tk callback returns 'return' status"
end
# File tk/lib/tk.rb, line 1237
def inspect
sprintf("#<Class(TkCallbackEntry):%0x>", self.__id__)
end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.