Skip navigation.
 
mlRe: NSRunAlertPanel()
FROM : Jeremy Erwin
DATE : Tue Nov 12 21:55:01 2002

On Tuesday, November 12, 2002, at 11:40  PM, Joachim Haagen Bøe wrote:

> According to Aaron Hillegass' book you use a C function to show an 
> alert panel. The declaration is
>
> int NSRunAlertPanel(NSString *title, NSString *msg, NSString 
> *defaultButton, NSString *alternateButton, NSString *otherButton);
>
> I know that Aaron Hillegass' book isn't written for Jaguar, and wonder 
> if Apple have implemented an Objective-C function for this instead.
>
>

"Learning Cocoa" (1st edition) uses NSBeginAlertSheet, which is still a 
function, but it does incorporate selectors. In that respect it's more 
"Cocoa-ish" than switching on the return code of NSRunAlertPanel.

file:///System/Library/Frameworks/AppKit.framework/Versions/C/
Resources/English.lproj/Documentation/Reference/ObjC_classic/Functions/
AppKitFunctions.html

There's also
file:///Developer/Documentation/Cocoa/TasksAndConcepts/
ProgrammingTopics/WinPanel/iUsingModalWindows.html

which is probably intended for far more complex situations than simple 
alert panels.

Jeremy

Related mailsAuthorDate
mlNSRunAlertPanel() Joachim Haagen Bøe Nov 12, 20:42
mlRe: NSRunAlertPanel() Jeremy Erwin Nov 12, 21:55
mlRe: NSRunAlertPanel() Joachim Haagen Bøe Nov 12, 22:18
mlRe: NSRunAlertPanel() Scott Anguish Nov 13, 00:41