Array in P5 controlEvent ?
in
Contributed Library Questions
•
1 year ago
Hi,
I'm wondering if it's possible to do an array in P5 controlEvent.
I was trying an array of some 25 toggles in P5 but when I get through controlEvent(ControlEvent theEvent) {
switch(theEvent.controller().id()) {
I could'nt do an array of case id and I get "expecting RCURLY, found case " message.
Does someone know how to handle that?
- for (int i = 0 ; i < IntentionButtonNum ; i++) {
- for (int j = 0 ; j < IntentionButtonNum ; j++) {
- case (140+IntentionButtonControlerCounter):
- {
- Cell+IntentionButtonControlerCounter = (theEvent.controller().value() == 1.0) ? true : false;
- break;
- }
- IntentionButtonControlerCounter++;
- }
- }
1