openfl/openfl — pull request #360 by brutalexcess (2014-10-14 21:45:47+00:00)
Title: Interfaces for events; simpler addEventListener functionality

The simple idea behind this is to allow for a simpler approach to event
handling.

If implemented - literally - by the classes who use these events, a
simple call to something like TextField would be a good addition (it's
more C#-esque).

`myTextField.onMouseDown = tfMouseDown;`

Just a suggestion.

If you like it, I can add implements to the appropriate classes throughout and add the event handlers. Event handling could be as simple as above.

Also, `myTextField.onMouseDown = null;` even easier than `myTextField.removeEventListener(MouseEvent.MOUSE_DOWN, tfMouseDown);`