Re: Modal window and 'hanging' menu
Re: Modal window and 'hanging' menu
- Subject: Re: Modal window and 'hanging' menu
- From: John Stiles <email@hidden>
- Date: Tue, 29 Apr 2008 16:17:12 -0700
You could probably use NSMenu's -cancelTracking to work around this. (I
guess you could send it to every menu in the menubar, or see if just
sending it to mainMenu is good enough.)
Or, you can use -menuWillOpen: and -menuDidClose: to watch for when the
user accesses the menus, and postpone your dialog's appearance if they
have a menu open. IMO that would be a better user experience.
Note that all of these solutions require Leopard.
Graham Cox wrote:
From the docs for runModalForWindow:
"Use this method in cases where you do not need to do any additional
background processing while the modal loop runs. This method consumes
only enough CPU time to process events and dispatch them to the action
methods associated with the modal window. If you want to perform
additional background processing, use runModalSession: together with
an NSModalSession object instead."
I guess closing the menu counts as background processing, so the
solution would seem to lie in not handling your UI this way.
hth,
G.
On 30 Apr 2008, at 7:12 am, Manfred Schwind wrote:
I have a modal dialog window that "pops up" at some time. I am doing
the modal session with [NSApp runModalForWindow:window].
If the user has clicked into the menu bar just before this modal
window opens, the menu is hanging down and can not be closed before
the modal window is closed.
Is there anything I can do about that?
Mani
--
http://www.mani.de
iVolume - Loudness adjustment for iTunes.
LittleSecrets - The encrypted notepad.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden