Instance Method

runModalForTypes:

Displays the panel and begins a modal event loop that is terminated when the user clicks either OK or Cancel.

Declaration

- (NSInteger)runModalForTypes:(NSArray *)fileTypes;

Parameters

fileTypes

An array of file extensions and/or HFS file types. Specifies the files the panel allows the user to select. nil makes all files selectable by the user. An array of types passed in here will override one set using allowedFileTypes.

Return Value

The button used to dismiss the dialog: NSOKButton for the OK button and NSCancelButton for the Cancel button.

Discussion

This convenience method sends runModalForDirectory:nil file:nil types:fileTypes to the panel. See runModalForDirectory:file:types: for additional details.

See Also

Deprecated

filenames

Returns an array containing the absolute paths (as NSString objects) of the selected files and directories.

Deprecated
beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo:

Presents an Open panel as a sheet with the directory specified by absoluteDirectoryPath and optionally the file specified by filename selected.

Deprecated
runModalForDirectory:file:types:

Displays the panel and begins a modal event loop that is terminated when the user clicks either OK or Cancel.

Deprecated