shoes/shoes4 — pull request #221 by arnebrasseur (2013-03-24 19:15:40+00:00)
Title: Implement the #change method on ListBox, EditLine and EditBox.

As described in the manual, on these three elements extra event handlers can be
set by passing a block to the `change' method. This block will receive the
element instance when a change happens. This can be choosing an item in the
ListBox, or editing the text in EditLine or EditBox.

Most of the functionality is grouped in Shoes::Common::Changeable, with some
work left in the constructors to wire everything up. It is also possible to pass
a block straight to the constructor, and this was already implemented. The way
this worked though has changed.

In the past the block was passed on the GUI backend, which was responsible for
calling it when a change happens. Now the GUI backend no longer receives a block,
instead the DSL layer sets up the block as any other `change' event handler, and
the backend is only responsible for notifying the DSL layer that something has
changed.

All code has been covered by tests, and I tried out some examples. However
EditBox seems to be broken(?). ListBox and EditLine work fine.

This change is signifcant because it fixes 'browser.rb' in shoes-contrib. That
is, though the layout of browser.rb is not the same as in Red Shoes, it is
functioning and can be used to browse the Shoes examples using Shoes4.