Many thanks again. I had missed this. Your explanation reinforced its
importance so I'm not likely to forget in the future.
Should "return True" be also added to the app menu handlers? or just
the window handlers?
Barrie
On Nov 28, 2004, at 1:28 PM, Lars Jensen wrote:
I have never used the window menu
handlers before. Now I see how useful they are.
Indeed they are...but I left out one important item: be sure to return
True
from your menu handlers.
If you return False, then your app will think that the user's menu
selection
is still unhandled, and pass it along to the next entity in line to
get it
(typcially a window if the handler is in a control, or the application
if
the handler is in a window). So depending on how your handlers are
arranged,
your app could respond with multiple Print actions.
It's easy to miss this because RB doesn't require explicit return
values (a
deficiency in my view), and they don't appear by default in menu
handlers.
lj
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|