Instance Method

setRequiredFileType:

Specifies the file type (as an extension) or a UTI.

Declaration

- (void)setRequiredFileType:(NSString *)type;

Parameters

type

String to set as the extension to be appended to any selected files that don’t already have that extension.

Discussion

If type is an extension, it should not include the period that begins the extension. Pass nil to indicate any type. File type strings encoding HFS file types are not valid values for this attribute. You need to invoke this method each time the Save panel is used for another file type within the application.

This method is equivalent to using allowedFileTypes with an array containing only type (unless type is nil, and then it’s equivalent to setting the property to nil).

See Also

Methods

- requiredFileType

Returns the required file type (if any).

Deprecated
- setDirectory:

Sets the current pathname in the panel’s browser.

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

Deprecated
- runModalForDirectory:file:

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

Deprecated
- panel:compareFilename:with:caseSensitive:

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

Deprecated
- panel:isValidFilename:

Gives the delegate the opportunity to validate selected items.

Deprecated
- panel:shouldShowFilename:

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

Deprecated
- panel:directoryDidChange:

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

Deprecated
- directory

Returns the absolute pathname of the directory currently shown in the panel.

Deprecated
- filename

Returns the absolute pathname of the file currently shown in the panel.

Deprecated
- selectText:

This method has been deprecated.

Deprecated