JUCE Playlist

class “juce::FileChooser” has no member “browserForMultipleFilesToOpen”

Why am I getting this error and how can I fix it?

void PlaylistComponent::buttonClicked(Button* button)
FileChooser chooser(“Select files to open…”);
if (chooser.browseForMultipleFilesToOpen()){
Array ids = chooser.getResults();
for (File id : ids)

Define JUCE_MODAL_LOOPS_ALLOWED to 1 in your jucer file

Just adding to this, that modal loops are discouraged, so instead of defining the macro (which undoes an improvement to the code base) you should use the asynchronous alternatives.

Have a look at the documentation

Add canSelectMultipleItems to the flags in addition to the example.