ffAudio / foleys_gui_magic

A GUI builder module for JUCE - with examples

Home Page:https://foleysfinest.com/developer/pluginguimagic/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to build example project: SignalGenerator

godofecht opened this issue · comments

I get the following error: Use of class template 'juce::Component::SafePointer' requires template arguments

System: Mac OS M1
JUCE: 7.0.2

Changing the line in juce::Component::SafePointerjuce::AudioProcessorEditor safeEditor (editor); worked for me.

in foleys_MagicProcessorState...

`void MagicProcessorState::setStateInformation (const void* data, int sizeInBytes, juce::AudioProcessorEditor* editor)
{
auto tree = juce::ValueTree::readFromData (data, size_t (sizeInBytes));
if (tree.isValid() == false)
return;

auto newState = getValueTree();
if (newState.getType() != tree.getType())
    return;

newState.copyPropertiesAndChildrenFrom (tree, nullptr);

parameters.loadParameterValues (newState);

if (editor)
{
    int width, height;

    if (getLastEditorSize (width, height))
    {
        juce::Component::SafePointer<juce::AudioProcessorEditor> safeEditor (editor);
        juce::MessageManager::callAsync([safeEditor, width, height]
                                        {
            if (safeEditor)
                safeEditor->setSize (width, height);
                                        });
    }
}

}`

May I submit a PR?