gettingstarted
[Top] [All Lists]

Re: Active window

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Active window
From: Barrie Jones <barrie at spamcop dot net>
Date: Sun, 28 Nov 2004 14:03:16 -0500
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <BDCF82F0 dot ABE4%larsjensen at rcn dot com>
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>

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