Unable to build example project: SignalGenerator
godofecht opened this issue · comments
Abhishek Shivakumar commented
I get the following error: Use of class template 'juce::Component::SafePointer' requires template arguments
System: Mac OS M1
JUCE: 7.0.2
Abhishek Shivakumar commented
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?