Instance Method


Gives the delegate the opportunity to filter items that it doesn’t want the user to choose.


- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename;



Panel that is querying whether it should show a certain file.


String representing the name of the file to be loaded in the browser.

Return Value

YES if filename should be selectable, and NO if the save panel should disable the file or directory.


The NSSavePanel object sender sends this message to the panel’s delegate for each file or directory (filename) it is about to load in the browser.

See Also

Running Panels

- beginSheetForDirectory:file:modalForWindow:modalDelegate:didEndSelector:contextInfo:

Presents a Save panel as a sheet with a specified path and, optionally, a specified file in that path.

- beginSheetModalForWindow:completionHandler:

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

- 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.

- runModalForDirectory:file:

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

- panel:compareFilename:with:caseSensitive:

Controls the ordering of files presented by the NSSavePanel object specified.

- panel:isValidFilename:

Gives the delegate the opportunity to validate selected items.

- validateVisibleColumns

Validates and possibly reloads the browser columns visible in the panel by invoking the delegate method panel:shouldShowFilename:.

- panel:directoryDidChange:

Tells the delegate that the user has changed the selected directory in the NSSavePanel object specified.