Hello! For several days now I can’t understand why this error occurs, everything seems to be correct. Maybe someone has come across or knows what could be the matter?
error:
“No matching constructor for initialization of ‘juce::AudioProcessorValueTreeState::ButtonAttachment’”
The second parameter of ButtonAttachment is of type juce::String not std::string. Use juce::String(i) and this will be resolved. (I don’t know what the type of your buttons field is, so you might also need to dereference the result of the operator [int] with *buttons[i]).
The semantics are a hole different question though. The second parameter is supposed to be the parameter id you want to attach inside the APVTS. In this case, either the parameter is really named 0 which wouldn’t be that good since it is not descriptive, or the name is not 0 and you should check how you can pass the name. Its the same name when you create the parameter layout for your APVTS.
Thank you very much, but the problem was not in juce::String, I understood what was the matter - “new ToggleButton” returned a pointer, just had to put * in the right place. I need to learn C++ better