The FileChooser implementation doesn’t seem to be consistent across Mac and Windows. Our application would benefit from having a “New Folder” FileChooser button on the Mac, which it doesn’t. On the other hand, FileChooser on Windows has a “Make New Folder” button on the lower left. Am I overlooking something? If not, it would be great if FileChooser had a flag that could be set/unset for this attribute.
We are using the 1.50 release on Mac and close to the tip (around 11/2009) on Windows.
Sorry, I left out some crucial info. We are using FileChooser::browseForDirectory(). (We’re asking the user to select a directory before performing an operation.) On Mac, browseForDirectory() only lets you browse existing directories and does not provide a “New Folder” button. This is what we’re after. Thanks!
Well, you’d better write to Steve Jobs and ask him! Presumably OSX only shows a new folder button on a ‘save’ box, which seems pretty reasonable to me.
Sorry for bringing this back on topic, but it’s not accurate. OS X does provide a way to show a “New Folder” button in an Open dialog. NSOpenPanel inherits from NSSavePanel, which implements setCanCreateDirectories.
The following will work:
juce_mac_FileChooser.mm, line 114 (add after creating the panel)
FileChooser::showPlatformDialog
{
…
if (selectsDirectory) {
[panel setCanCreateDirectories:YES];
}