FileChooser, new JUCE user, programming error?


#1

Hello,

I am not sure if this is working as designed.

When you use FileChooser class and browseForMultipleFilesToOpen(), if you select one file JUCE stores the directory of that file as the future initialFileOrDirectory somewhere.

If you select more than one file it does not, the next time you open a dialog it opens from the original initialFileOrDirectory. This is on Windows XP.


I do not know why this should be or how to work around it without keeping track of initialFileOrDirectory myself.
 

Thanks for reading.


#2

if you select one file JUCE stores the directory of that file as the future initialFileOrDirectory somewhere.

No, it doesn't. If you don't supply an initial file, then the OS will use whatever folder it chooses, so perhaps Windows is remembering the last location, but it's not done by juce, nor is it behaviour that you should rely on. Just store the last location yourself so you have control of what happens.


#3

Will do, thanks for your help.