Open damiensellier opened 2 weeks ago
Source/Native/CtrlrMac.cpp
https://docs.juce.com/master/classFileChooser.html
Try launch async :
std::unique_ptr<FileChooser> [myChooser](https://docs.juce.com/master/classStaticAnimationLimits.html);
void [loadMooseFile](https://docs.juce.com/master/classStaticAnimationLimits.html)()
{
[myChooser](https://docs.juce.com/master/classStaticAnimationLimits.html) = std::make_unique<FileChooser> ("Please select the moose you want to load...",
[File::getSpecialLocation](https://docs.juce.com/master/classFile.html#a2a4396bc0e6f8b0430f6f54d029899e5) ([File::userHomeDirectory](https://docs.juce.com/master/classFile.html#a3e19cafabb03c5838160263a6e76313da8620eabc38cfbd921a52d10157463c5e)),
"*.moose");
auto [folderChooserFlags](https://docs.juce.com/master/classStaticAnimationLimits.html) = [FileBrowserComponent::openMode](https://docs.juce.com/master/classFileBrowserComponent.html#a32888a950cc0e51c8e1350f53bea43d6a15f4871e1610d912885cc6de504e13e5) | [FileBrowserComponent::canSelectDirectories](https://docs.juce.com/master/classFileBrowserComponent.html#a32888a950cc0e51c8e1350f53bea43d6ab7e808e7b8a33afb0150e9ea6047c2dd);
[myChooser](https://docs.juce.com/master/classStaticAnimationLimits.html)->launchAsync ([folderChooserFlags](https://docs.juce.com/master/classStaticAnimationLimits.html), [this] (const [FileChooser](https://docs.juce.com/master/classFileChooser.html)& chooser)
{
[File](https://docs.juce.com/master/classFile.html) [mooseFile](https://docs.juce.com/master/classStaticAnimationLimits.html) (chooser.[getResult](https://docs.juce.com/master/classFileChooser.html#a0ece12c12985b388f4fe988cbccfade6)());
[loadMoose](https://docs.juce.com/master/classStaticAnimationLimits.html) ([mooseFile](https://docs.juce.com/master/classStaticAnimationLimits.html));
});
}
Native macOS is not called properly when saving/opening restricted instance for exemple.
The command to call the native file manager must be fixed or worst case scenario Open/Save File manager needs to be set to JUCE instead of Native for macOS by default.