gettingstarted
[Top] [All Lists]

Re: Active window

To: <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Active window
From: Lars Jensen <larsjensen at rcn dot com>
Date: Sun, 28 Nov 2004 13:28:16 -0500
Delivered-to: gettingstarted at lists dot realsoftware dot com
> 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>

<Prev in Thread] Current Thread [Next in Thread>