mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fd46a1da0a
configure.in : add --enable-setreuid option tcltklib.c : TclTkIp.new accepts 'ip-name' and 'options' ( e.g. TclTkIp.new('FOO', '-geometry 500x200 -use 0x2200009') ) tk.rb : support arguments of TclTkIp.new ( see TkCore::IP_NAME, TkCore::IP_OPTS ) tk*.rb : preparations for multi-Tk interpreter support git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
29 lines
666 B
Ruby
29 lines
666 B
Ruby
#
|
|
# tkbgerror -- bgerror ( tkerror ) module
|
|
# 1998/07/16 by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
|
|
#
|
|
require 'tk'
|
|
|
|
module TkBgError
|
|
extend Tk
|
|
|
|
TkCommandNames = ['bgerror'.freeze].freeze
|
|
|
|
def bgerror(message)
|
|
tk_call 'bgerror', message
|
|
end
|
|
alias tkerror bgerror
|
|
alias show bgerror
|
|
module_function :bgerror, :tkerror, :show
|
|
|
|
def set_handler(hdlr = Proc.new) #==> handler :: proc{|msg| ...body... }
|
|
tk_call('proc', 'bgerror', 'msg', install_cmd(hdlr) + ' $msg')
|
|
end
|
|
def set_default
|
|
begin
|
|
tk_call('rename', 'bgerror', '')
|
|
rescue RuntimeError
|
|
end
|
|
end
|
|
module_function :set_handler, :set_default
|
|
end
|