Module: Tk::Bind
- Included in:
- Widget
- Defined in:
- lib/ffi-tk/command/bind.rb
Class Method Summary collapse
- .bind(tag, sequence = None) ⇒ Object
-
.unbind(tag, sequence) ⇒ Object
TODO: remove the block associated.
Instance Method Summary collapse
Class Method Details
.bind(tag, sequence = None) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/ffi-tk/command/bind.rb', line 4 def self.bind(tag, sequence = None) if None == sequence Tk.execute(:bind, tag).to_a else if block_given? Event::Handler.register(tag, sequence, &Proc.new) else Tk.execute(:bind, tag, sequence).to_s end end end |
.unbind(tag, sequence) ⇒ Object
TODO: remove the block associated
17 18 19 |
# File 'lib/ffi-tk/command/bind.rb', line 17 def self.unbind(tag, sequence) Event::Handler.unregister(tag, sequence) end |