WildcardFileFilter, latest tip


#1

I just built the latest JUCE source and I’m now having a problem with the WildcardFileFilter class. Should the following code not display all files in particular directory? As it stands it doesn’t display anything. Even if I change the extension type to .txt or .wav it still won’t display them.

WildcardFileFilter wildcardFilter (T("."), T(""), T(“Select a Csd file”));
FileBrowserComponent openBrowser (FileBrowserComponent::openMode, File::nonexistent, &wildcardFilter, 0);
FileChooserDialogBox openBox (T(“Open file”),T(“Please choose a file that you want to open…”),openBrowser, 0, Colours::floralwhite);
openBox.show();

Any ideas what I might be doing wrong?


#2

The main thing you’re doing wrong is not running in the debugger! I just tried your code and immediately hit an assertion with a nice message explaining that you’ve given it the wrong flags!


#3

Sorry Jules, my bad. On the plus side, I’m finally learning how to use the debugger, if and when I remember to use it!