Sha256: bb17a2e7a891cd10977942146d2228396616561b23a444bacae6973b06901325
Contents?: true
Size: 666 Bytes
Versions: 9
Compression:
Stored size: 666 Bytes
Contents
module Tk module After module_function def ms(ms) if block_given? id = nil block = Proc.new wrap = lambda{|*args| block.call Tk.unregister_proc(id) true } id, command = Tk.register_proc(wrap, 'after_ms') Tk.execute_only(:after, ms, command) else Tk.execute_only(:after, ms) end end def idle(&block) id = nil wrap = lambda{|*args| block.call Tk.unregister_proc(id) true } id, command = Tk.register_proc(wrap, 'after_idle') Tk.execute_only(:after, :idle, command) end end end
Version data entries
9 entries across 9 versions & 1 rubygems