Hi Juce people,
I’ve got a very strange and frustrating bug to do the FileChooser class on windows. I created a GUI Application through the projucer, which has a button on it which is used to open the windows file chooser using the following code:
void FolderChooserArea::buttonClicked(juce::Button *buttonThatWasClicked)
{
DBG(“button was clicked”);
FileChooser myChooser ("Please select a folder to analyse",
File::getSpecialLocation (File::userHomeDirectory),
"*");
if (myChooser.browseForDirectory())
{
File folder (myChooser.getResult());
String folderPath = folder.getFullPathName();
setFolderPath(folderPath);
}
}
the first time I click the button on my UI to open the file chooser everything works as expected. If I click OK on the windows file chooser the window closes, as expected. However, if I click the button on my UI to open the file chooser again the file chooser does not appear and the app appears to freeze. There is a brief moment just after I click the button on my UI for the second time where some kind of popup seems to appear just before everything freezes.
I have tried frantically to debug this but haven’t managed to solve the problem. If anyone has any thoughts that might help I’d be very grateful to hear them!
Thanks,
Toby