Re: Modal window and app Quit
Re: Modal window and app Quit
- Subject: Re: Modal window and app Quit
- From: tridiak <email@hidden>
- Date: Fri, 24 Aug 2012 07:06:48 +1200
On 24/08/2012, at 6:34 AM, Jens Alfke wrote:
>
> On Aug 23, 2012, at 10:52 AM, tridiak <email@hidden> wrote:
>
>> I have a simple document app-wide modal window shown using [NSApp showModal:].
>> It works all fine and dandy.
>> Problem is, if Cmd-Q is initiated, it does a highlight of the Application menu, makes a beep
>
> That's correct behavior; modal windows are supposed to disable quit. They're generally considered bad UI for anything other than an urgent "I can't do anything else until you response to this!" type of alert, so consider changing your UI to avoid using one of these if you don't really need to. (If you want the user to be able to quit while it's up, that's a sign that you don't need it to be modal.)
Sorry. Should have been more clear.
I know the modal is supposed to block quit. But if I attempt quit while the modal window is up (it reaches applicationShouldTerminate:), the Quit menu item stays permanently disabled even after the window is dismissed.
Also just noticed that then Quit menu item is active. The text field control is causing this?
>
>> and the Quit menu item becomes permanently disabled after the modal window has been dismissed.
>
> That's weird, and implies that you might be dismissing the panel incorrectly.
>
> —Jens
I dismiss the panel using [NSApp stopModal]. It consists of a single OK button and an editable textfield (with a number formatter).
Would the edit field being screwing things up?
_______________________________________________
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