Hi all,
I have some problems. I’m new in cpp and JUCE. I’m trying to create a combo with CC midi programs. I’m trying to get the name of CC and add as new item in combo. This is my code.
for (int i = 0; i <= 127; i++)
{
String name = MidiMessage::getControllerName(i);
String cbName = "";
if (name.isNotEmpty())
{
cbName = name + "CC " + std::to_string(i);
// 2. cbName = "CC " + std::to_string(i) + name;
}
else if (name.isEmpty())
{
cbName = "CC " + i;
}
int s = i + 1;
cbControlChange.addItem(cbName, s);
}
The problems are:
-
Some CC are defined as null and name.isNotEmpty doesn’t work. I recieved that I’m trying to create combo with empty label.
-
If I change the label order (2) when isNotEmpty. I get an error and i cant find out why - it’s just concat strings
-
Why I can’t create and intem in Combox with index of 0? I got and error.
sorry for my english and sorry I’m web/app developer and I trying to adapt to cpp
Kind regards
This is what I get