Mac Developer Library

Developer

AppKit Framework Reference NSAlertDelegate Protocol Reference

Options
Deployment Target:

On This Page
Language:

NSAlertDelegate

Inheritance


Not Applicable

Import Statement


Swift

import AppKit

Objective-C

@import AppKit;

Availability


Available in OS X v10.6 and later.

The NSAlertDelegate protocol defines the optional methods implemented by delegates of NSAlert objects.

  • Sent to the delegate when the user clicks the alert’s help button. The delegate causes help to be displayed for an alert, directly or indirectly.

    Declaration

    Swift

    optional func alertShowHelp(_ alert: NSAlert) -> Bool

    Objective-C

    - (BOOL)alertShowHelp:(NSAlert *)alert

    Return Value

    YEStrue when the delegate displayed help directly, NOfalse otherwise. When NOfalse and the alert has a help anchor (setHelpAnchor:), the application’s help manager displays help using the help anchor.

    Discussion

    The delegate implements this method only to override the help-anchor lookup behavior.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.3 and later.

    Available as part of an informal protocol prior to OS X v10.6.

    See Also

    – setShowsHelp: (NSAlert)