Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open/Save File manager needs to be set to JUCE instead of Native for macOS by default #18

Open
damiensellier opened this issue Jun 14, 2024 · 2 comments

Comments

@damiensellier
Copy link
Owner

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.

@damiensellier
Copy link
Owner Author

damiensellier commented Jun 26, 2024

Source/Native/CtrlrMac.cpp

const Result CtrlrMac::exportWithDefaultPanel(CtrlrPanel* panelToWrite, const bool isRestricted, const bool signPanel)

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));
    });
}

@damiensellier
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant