enyojs/onyx — pull request #24 by sfeast (2012-06-22 17:23:45+00:00)
Title: Updating menus & pickers to use separate events for internal & client communication

Added a second event for client communication of item selection since the mix of inheritance and the decorator pattern made using onSelect for both menus and pickers too complicated and was actually already buggy in terms of communicating picker selections to the client. Now onChange is used rather than onSelect by the picker kinds to communicate changes between the activator (PickerButton), PickerDecorator and Picker. onSelect is now used by MenuItem to communicate to the client when a menu choice is made.

Note that FlyweightPicker stops the MenuItem onSelect event from reaching the client since it will not have the correct value in a flyweight context. FlyweightPicker sends its own onSelect event once it has the correct selected item value to send.