O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Panels

These functions provide a convenient way to display common alert panels and sheets. These functions let us create panels or sheets for informational purposes, to inform the user of an alert, and to inform the user of a critical alert.

NSBeginAlertSheet

void NSBeginAlertSheet(NSString *title, NSString *defaultButton, NSString *alternateButton, NSString *otherButton, NSWindow *docWindow, id modalDelegate, SEL didEndSelector, SEL didDismissSelector, void *contextInfo, NSString *msg, ...)

NSBeginCriticalAlertSheet

void NSBeginCriticalAlertSheet(NSString *title, NSString *defaultButton, NSString *alternateButton, NSString *otherButton, NSWindow *docWindow, id modalDelegate, SEL didEndSelector, SEL didDismissSelector, void *contextInfo, NSString *msg, ...)

NSBeginInformationalAlertSheet

void NSBeginInformationalAlertSheet(NSString *title, NSString *defaultButton, NSString *alternateButton, NSString *otherButton, NSWindow *docWindow, id modalDelegate, SEL didEndSelector, SEL didDismissSelector, void *contextInfo, NSString *msg, ...);

NSGetAlertPanel

id NSGetAlertPanel(NSString *title, NSString *msg, NSString *default-Button, NSString *alternateButton, NSString *otherButton, ...)

NSGetCriticalAlertPanel

id NSGetCriticalAlertPanel(NSString *title, NSString *msg, NSString *defaultButton, NSString *alternateButton, NSString *otherButton, ...)

NSGetInformationalAlertPanel

id NSGetInformationalAlertPanel(NSString *title, NSString *msg, NSString *defaultButton, NSString ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required