Disable Shift-Click Knob Text Box
- 
 @Oli-Ullmann said in Disable Shift-Click Knob Text Box: mods Okay, but what about const var mods = Knob1.createModifiers();?
- 
 @ILIAM 
 Phew, unfortunately I'm not familiar with this topic. I'll take a look when I have time. But maybe someone here knows something about it. :-)
- 
 You can use an array and loop over the knobs array. const mods = []; for (x in knobs) mods.push(x.createModifiers());
- 
 @d-healey said in Disable Shift-Click Knob Text Box: const mods = []; for (x in knobs) 
 mods.push(x.createModifiers());Thank you 
- 
 @d-healey But i see an error" const var knobs = [Content.getComponent("Knob1"), Content.getComponent("Knob2"), Content.getComponent("Knob3"), Content.getComponent("Knob4"), Content.getComponent("Knob5"), Content.getComponent("Knob6")]; const mods = []; for (x in knobs) mods.push(x.createModifiers()); for(k in knobs) { k.setModifiers(mods.TextInput, [mods.disabled, mods.disabled]); // No text input k.setModifiers(mods.ResetToDefault, [ mods.disabled, mods.disabled ]); // No Double click to Default };
- 
 
- 
 @d-healey const mods = []; for (x in knobs) mods.push(x.createModifiers()); for(k in knobs) { k.setModifiers(mods.TextInput, [mods.disabled, mods.disabled]); // No text input k.setModifiers(mods.ResetToDefault, [ mods.disabled, mods.disabled ]); // No Double click to Default };Interface:! Warning: undefined parameter 0 : Line 17, column 19 {SW50ZXJmYWNlfHwzMTB8MTd8MTk=} Interface:! Warning: undefined parameter 0 : Line 18, column 19 {SW50ZXJmYWNlfHwzOTZ8MTh8MTk=} Interface:! Warning: undefined parameter 0 : Line 17, column 19 {SW50ZXJmYWNlfHwzMTB8MTd8MTk=} Interface:! Warning: undefined parameter 0 : Line 18, column 19 {SW50ZXJmYWNlfHwzOTZ8MTh8MTk=} Interface:! Warning: undefined parameter 0 : Line 17, column 19 {SW50ZXJmYWNlfHwzMTB8MTd8MTk=} Interface:! Warning: undefined parameter 0 : Line 18, column 19 {SW50ZXJmYWNlfHwzOTZ8MTh8MTk=}
- 
 @ILIAM That's telling you that the parameter you're passing to a function on line 17 and 18 is undefined - in this case modsmodsis an array, you need to get the individual mod object from the array for each knob.
- 
 @d-healey So Loop doesn't works? 
- 
 @ILIAM Yes, but you'll need to modify it to access the mods. Probably a for loop rather than for in. 
- 
 @ILIAM 
 @d-healey is talking about something like this:const var knobs = [Content.getComponent("Knob1"), Content.getComponent("Knob2"), Content.getComponent("Knob3"), Content.getComponent("Knob4"), Content.getComponent("Knob5"), Content.getComponent("Knob6")]; const mods = []; for (x in knobs) mods.push(x.createModifiers()); for(i = 0; i < knobs.length; i++) { knobs[i].setModifiers(mods[i].TextInput, [mods[i].disabled, mods[i].disabled]); // No text input knobs[i].setModifiers(mods[i].ResetToDefault, [ mods[i].disabled, mods[i].disabled ]); // No Double click to Default };
- 
 



