Is there a way to open a NSAlert window, set a delegate for didEnd callback and while the alert is shown, all other windows should be “disabled” (can the window itself but not push any button or change any text)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In your NSAlert code add
In your didEnd callback add
For more information about modal windows read NSApplication‘s “Managing the Event Loop” section.
Update:
Here is a sample code from Apple’s doc showing how to run modal without callbacks.