Instance Method


Presents the panel as a sheet modal to the specified window.


- (void)beginSheetModalForWindow:(NSWindow *)window completionHandler:(void (^)(NSModalResponse result))handler;



The window in which the panel will be presented.


The block called after the user dismisses the panel. The argument passed in will be NSFileHandlingPanelOKButton if the user chose the OK button or NSFileHandlingPanelCancelButton if the user chose the Cancel button.


Configure all the relevant properties of the panel before you call this method. The completion handler block runs after the user dismisses the panel, but while the panel may still be onscreen. If you need to dismiss the panel from the screen—for example, if the completion block displays an alert—close the panel by calling its orderOut: method with the value nil.

See Also

Showing the Panel

- beginWithCompletionHandler:

Presents the panel as a modeless window.

- runModal

Displays the panel and begins its event loop with the current working (or last-selected) directory as the default starting point.

- validateVisibleColumns

Validates and reloads the browser columns visible in the panel.