class TclTkCallback: tcl/tk callbacks
Methods
Class Public methods
new(interp, pr, arg = nil)
Link
initialize(interp, pr, arg):
interp: interpreter(TclTkInterpreter)
pr: callback procedure(Proc)
arg: string to pass as block parameters of pr
bind command of tcl/tk uses % replacement for parameters
pr can receive replaced data using block parameter
its format is specified by arg string
You should not specify arg for the command like
scrollbar with -command option, which receives parameters
without specifying any replacement
# File ext/tk/lib/tcltk.rb, line 317 def initialize(interp, pr, arg = nil) # auto-generate tcl/tk representation (variable name) exp = TclTk._newname("c_") # initialize TclTkObject super(interp._tcltkip(), exp) # save parameters @pr = pr @arg = arg # register in the module TclTk._addcallback(self) end
Instance Public methods
_call(arg)
Link
_call(arg): invoke callback
arg: callback parameter