Re: NSBeginAlertSheet not waiting for button to be pushed
Kyle Sluder <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Feb 7, 2010 at 8:23 AM, Chad Leigh -- ObjectWerks Inc <chad+macosx-AU1NHruoRJaEK/[email protected]> wrote: >> You shouldn't be using that in Cocoa apps for a very long time now, use the NSAlert class. > > It is not marked as deprecated. Please see Using Alert Sheets in Sheet Programming Topics for Cocoa <http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/Sheets/Tasks/UsingAlertSheets.html>: "You can use the Application Kit’s functional API for alert sheets, or you can use the methods of the NSAlert class. The latter approach is recommended for applications built for Mac OS X v10.3 and later" > Definitely yes. The key window will always be the window that generated the request in my particular app. No it won't. You can make no guarantee to this effect. There are system panels such as the Character Viewer which can become key. You should always explicitly choose the window which displays the sheet. --Kyle Sluder