And another FileChooser issue


#1

In my app, the user can open & save Colours Schemes (skins). These are stored in the Resources/ColourSchemes dir of the bundle.

To load and save them I use a FileChooser (native OS X dialog), to which I pass this directory as second parameter.

Now, saving works perfectly. But opening does not work, in fact the FileChooser does not show the correct directory, but instead shows the directory where the bundle itself is located in.

I pass exactly the same parameters to the Filechooser for opening & saving, so that cannot be the problem.

Please let me add, that with the JUCE (non-native) FileChooser dialog it works!

I’m using Juce 1.45, so it’s still the old C++ code.

How can I fix this?


#2

Hmm - did you compare it with the SVN tip code to see if I’ve fixed it since then?


#3

As I said, this was still the old C++ version, and as far as I see this is not on the SVN anymore.


#4

Oh yes, I forgot I’d already replaced that class. Well maybe there’s a fix in 1.46? It’s so long since 1.45 that I can’t remember if this is a bug that I’ve fixed or not…


#5

Well, I don’t wanna change my JUCE too much. So, if you have the time, please check if the error is still in the new JUCE. For now, I will just be using the JUCE FileChooser, not the native one.


#6

For anybody having this issue in the Carbon versions of JUCE, you need to add a line in juce_mac_FileChooser.cpp

... if (NavGetDefaultDialogCreationOptions (&options) == noErr) { options.optionFlags |= kNavSelectDefaultLocation | kNavAllowOpenPackages // <---- add this!! ...


#7