At 2:33 PM -0600 18/4/06, Joseph J. Strout wrote:
At 3:03 PM -0500 4/18/06, Scott Thompson wrote:

Joe, is there a catch all event handler somewhere in the App class?
How can one catch those 'unhandled' events?

No, there isn't, and you can't -- but I wouldn't expect you to need to, either. The only time you wouldn't have an opportunity to catch such an event is if there really is nothing to handle it (i.e., no control has the keyboard focus and no menus are open, etc.), in which case a beep is the correct behavior on Windows.

Usually, when this beep happens inappropriately, it's because you handled the event, but forgot to return True. For example, this often happens in menu handlers, where returning True is only moderately important on the Mac, but is very important on Windows.

In an EditField it's a bit different, since it's going to handle it either way -- if you return False, then it just goes about its usual keyboard handling. But this would probably NOT apply if you change the focus during the KeyDown, since then the control that has the focus would not be the one that actually triggered the keyboard event.

Best,
- Joe

Joe,
Thanks for this 'beep' insight. For the last two years, when my apps start up on Windows they beeped and I could never find out what it was. Now I have something else to check.
--

Cheers,

Dr Gerard Hammond
Bioinformatic Analyst
Garvan Institute of Medical Research, Sydney, Australia.

If it's worth doing, then it's worth doing with excess.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to