dart-lang/spark — pull request #1638 by ussuri (2014-04-18 23:02:25+00:00)
Title: More work on event bus

@devoncarew
* Tighter event type/data integration
* Easier to define complex events with multiple data items (as the coming FilesController's FileSelectionChanged is).
* The resulting custom events belong to a single hierarchy: easier to find what events are there and what data they carry.
* Easier onEvent() usage: event type can be baked into the listener, saving explicit downcasting in the listener's body:

bus.onEvent(BusEventType.SOME_EVENT).listen((SomeEvent e) { e.method1(); x = e.data1; })