FilenameComponent greyed out folders


#1

…I’m sure this didn’t use to behave like this but I now when I launch the jucedemo AudioDemo and click the Browse button to choose an audiofile all directories are now greyed out and can’t be selected.

Here:

addAndMakeVisible (fileChooser = new FilenameComponent (T("audiofile"), File::nonexistent, true, false, false, formatManager.getWildcardForAllFormats(), String::empty, T("(choose a WAV or AIFF file to play)")));

I suspected the fileBrowserWildcard field so I changed it to:

addAndMakeVisible (fileChooser = new FilenameComponent (T("audiofile"), File::nonexistent, true, false, false, String::empty, String::empty, T("(choose a WAV or AIFF file to play)")));

And it works (but of course all files and directories are selectable rather than audiofiles only).

Perhaps the new Cocoa file methods treat directories differently from the way the Carbon ones did? Sorry Jules, I know this means looking at yet more Obj-C…


#2

Ah yes, looks like my wildcard filter was throwing out the folders as well. I’ve checked in a fix now.


#3

we just had a user complaining about it this week.