Reputation: 33
I want to set a filter for audio files only so I wrote this line
fileChooser->setFileFilter(WildcardFileFilter("*.wav;*.aiff", "Audio Files"));
However when I do this it gives me the error "No matching constructor for initialization of 'juce::WildcardFileFilter'"
What do I put in to make it work?
Upvotes: 0
Views: 817
Reputation: 66
You are missing one parameter for the constructor. First param is fileWildcardPatters - that one you have. Next one is directoryWildcardPatterns, this one you seem to be missing. Pass this is an empty string to only select files, last one is description which in your case seem to be "Audio Files".
So I propose you code like this (if you are only interested in files):
fileChooser->setFileFilter(WildcardFileFilter("*.wav;*.aiff", "", "Audio Files"));
Upvotes: 2