Contents

runModalForDirectory:file:

Initializes the panel to the directory and file specified, if any, then displays it and begins its modal event loop.

Declaration

- (NSInteger) runModalForDirectory:(NSString *) path file:(NSString *) name;

Parameters

  • path:

    Directory whose files the panel displays. When nil, the directory is the same directory used in the previous invocation of the panel; this is probably the best choice for most situations.

  • name:

    Specifies a particular file in path that is selected when the Save panel is presented to a user. When nil, no file is initially selected.

Return Value

NSFileHandlingPanelOKButton (if the user clicks the OK button) or NSFileHandlingPanelCancelButton (if the user clicks the Cancel button).

Discussion

This method invokes NSApplication’s runModal(for:) method with self as the argument.

See Also

Related Documentation

Methods