[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPanel and modal run loop

From: Riccardo Mottola
Subject: Re: NSPanel and modal run loop
Date: Wed, 12 Jun 2013 10:34:31 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0 SeaMonkey/2.17.1


Wolfgang Lux wrote:

On the mac, the following may happen: the user hits the "close" button of the window or 
hits "esc". In that case, the panel disappears, but the app is still in the modal run 
loop (all interfaces disabled). The only thing I can do is terminate the application.
I guess instead that I should be able to trap that closure and return either 
NSAlertAlternateReturn or NSAlertErrorReturn. What do you think? and how? I tried to 
implement "performClose" but it doesn't get called in the delegate.
If possible, you should not be using an application modal dialog at all.
If that's not possible, you probably should remove the close button from the 
modal dialog and set Esc as key equivalent of the Cancel button.
Well, logically the request is modal, the user shouldn't perform any other actions until he inputs the data. Usually modal panels should be easy to do, so I guess I'm missing something here.

It looks you suggest more some kind of workaround? or is the "close" button incompatible with a modal panel? I tried some google-gu, but found nothing of use.

I also wonder about the differences between GS and Cocoa.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]