Type Method

alertWithError:

Returns an alert initialized from information in an error object.

Declaration

+ (NSAlert *)alertWithError:(NSError *)error;

Parameters

error

Error information to display.

Return Value

An initialized alert.

Discussion

The NSAlert class extracts the localized error description, recovery suggestion, and recovery options from the error parameter and uses them as the alert’s message text, informative text, and button titles, respectively.

See Also

Creating Alerts

- init

Returns an initialized alert.

+ alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:

Creates an alert compatible with alerts created using the NSRunAlertPanel function for display as a warning-style alert.

Deprecated