In Cocoa on OS X, what use interface component allows the user to select a new file?

61 views Asked by At

I understand how to use an NSOpenPanel to allow the user to select one or more existing files or directories, using a filename suffix. E.g.:

NSOpenPanel *openPanel = [NSOpenPanel openPanel];
openPanel.canChooseFiles = YES;
openPanel.canChooseDirectories = NO;
openPanel.allowsMultipleSelection = NO;
openPanel.allowedFileTypes = @[@"sqlite3"];

However, I would like to know if there is a component that allows the user to select a new file. That is, they select a directory from the NSOpenPanel and type in a filename. Is there a pre-built component for this?

1

There are 1 answers