Instance Method

beginCriticalSheet:completionHandler:

Starts a document-modal session and presents the specified critical sheet.

Declaration

- (void)beginCriticalSheet:(NSWindow *)sheetWindow completionHandler:(void (^)(NSModalResponse returnCode))handler;

Parameters

sheetWindow

The window object that represents the critical sheet to present. A critical sheet contains content that is time-critical or very important to the user.

handler

The completion handler that gets called when the sheet’s modal session ends.

Discussion

This method displays the sheet—on top of the window’s current sheet, if one exists—makes it key and returns control to the caller. While the sheet remains visible, most events targeted at the receiver are prohibited. The runloop does not enter any special mode to accomplish this.

If the window already has a sheet when this method runs, the existing sheet is temporarily disabled while the critical sheet is presented. When the critical sheet is dismissed, the previously presented sheet continues its standard operation.

See Also

Managing Sheets

attachedSheet

The sheet attached to the window.

sheet

A Boolean value that indicates whether the window has ever run as a modal sheet.

- beginSheet:completionHandler:

Starts a document-modal session and presents—or queues for presentation—a sheet.

- endSheet:

Ends a document-modal session and dismisses the specified sheet.

- endSheet:returnCode:

Ends a document-modal session and dismisses the specified sheet.

sheetParent

The window to which the sheet is attached.

sheets

An array of the sheets currently attached to the window.