
On Sat, Sep 4, 2010 at 4:44 AM, Yakov Galka <ybungalobill@gmail.com> wrote:
That's right because event passing should be more complicated than just calling the right callback function. Consider keyboard input. Keyboard is a shared resource, therefore keyboard events must be forwarded from the focused window up the chain of its parents until some handler marks explicitly that it handled the event. I'm not familiar with any framework/OS which handles keyboard input this way (if you know, tell me please), but it seems that this approach will eliminate the necessity of message filtering to implement accelerators, for example.
Messages should be sent down from parent to child, then back up. Some systems do parent down. Others do child up. Both end up needing hacks to handle the exceptional cases. So do both. See ActionScript 3.0. http://www.adobe.com/devnet/actionscript/articles/event_handling_as3_03.html Tony