Module: Shoes::Common::Changeable

Includes:
SafelyEvaluate
Included in:
InputBox, ListBox
Defined in:
shoes-core/lib/shoes/common/changeable.rb

Overview

Changeable elements are elements that receive ‘change’ events. These are ListBox, EditBox and EditLine. To have your code respond to these events, either pass a block in when creating the element, or call #change on the element with a block.

Instance Method Summary collapse

Methods included from SafelyEvaluate

#safely_evaluate

Instance Method Details

#change { ... } ⇒ Shoes::ListBox, ...

Add an extra change event listener block

Yields:

  • The block to execute on a change event

Returns:



16
17
18
19
# File 'shoes-core/lib/shoes/common/changeable.rb', line 16

def change(&blk)
  add_change_listener(blk)
  self
end