juce::FileChooser has no member "browseForFileToOpen"

Hi,

I can see from the documentation that browseForFileToOpen is public member function of FileChooser but when I use it, I get error that class “juce::FileChooser” has no member “browseForFileToOpen”.

Please help!!!

Enable JUCE_MODAL_LOOPS_PERMITTED.

Thanks @rory it worked. here it says

With JUCE_MODAL_LOOPS_PERMITTED set to 0 code that previously relied upon modal
loops will need to be rewritten to use asynchronous versions of the modal
functions.

Can you please point me to any example of how to use asynchronous versions of the modal functions? Thanks

This scroll down to opening a file. Shows you the general pattern, just rework it to save.

I was going to suggest looking through the JUCE source code but @Fandusss beat me to the mark.