Function

NSGetAlertPanel

Returns an alert panel.

Declaration

id NSGetAlertPanel(NSString *title, NSString *msgFormat, NSString *defaultButton, NSString *alternateButton, NSString *otherButton, ...);

Discussion

Returns an NSPanel that can be used to set up a modal session. A modal session is useful for allowing the user to interrupt the program. During a modal session, you can perform activities while the panel is displayed and check at various points in your program whether the user has clicked one of the panel’s buttons. The arguments for this function are the same as those for NSRunAlertPanel, but unlike that function, no button is displayed if defaultButton is nil.

To set up a modal session, send the Application object beginModalSessionForWindow: with the panel returned by NSGetAlertPanel as its argument. When you want to check if the user has clicked one of the panel’s buttons, use runModalSession:. To end the modal session, use endModalSession:. When you’re finished with the panel created by NSGetAlertPanel, you must dispose of it by passing it to NSReleaseAlertPanel.

See Also

Views and Controls

NSForm

An NSForm object is a vertical matrix of NSFormCell objects to implement the fields.

Deprecated
NSFormCell

The NSFormCell class is used to implement text entry fields in a form. The left part of an NSFormCell object contains a title. The right part contains an editable text entry field.

NSMenuItemCell

An object that handles the measurement and display of a single menu item in its encompassing frame.

NSBeginAlertSheet

Creates and runs an alert sheet.

Deprecated
NSBeginCriticalAlertSheet

Creates and runs a critical alert sheet.

Deprecated
NSBeginInformationalAlertSheet

Creates and runs an informational alert sheet.

Deprecated
NSGetCriticalAlertPanel

Returns an alert panel to display a critical message.

Deprecated
NSGetInformationalAlertPanel

Returns an alert panel to display an informational message.

Deprecated
NSReleaseAlertPanel

Disposes of an alert panel.

Deprecated
NSRunAlertPanel

Creates an alert panel.

Deprecated
NSRunCriticalAlertPanel

Creates and runs a critical alert panel.

Deprecated
NSRunInformationalAlertPanel

Creates and runs an informational alert panel.

Deprecated
NSInputManagerDeprecated
NSInputServerDeprecated
NSDisableScreenUpdates

Disables screen updates.

Deprecated
NSEnableScreenUpdates

Enables screen updates.

Deprecated