Assign array of components to local LAF
-
Hi Folks,
I have an array containing script references for UI components which i like to assign to local LAF, calledmyUiComponents[]
I now wan't to assign these Components to a local LAF function called "loclaf".
I tried this, which doesn't seem to work:
for (i=0;i<myUiComponents.length;i++) { myUiComponents[i].getId() + ".setLocalLookAndFeel(loclaf)"; }
It compiles fine, but the UI Components have the default HISE look. Any ideas? I'm a noob in scripting, so forgive me that maybe silly question. ;-)
-
for (x in myUiComponents) x.setLocalLookAndFeel(loclaf);
-
@d-healey Thank you so much, that did the trick!
After thinking about it, i asked myself, why i thought, it would work by adding a string.
But this one is so much easier i could imagine.I still don't really got the syntax of the range oriented for-loop. in this case, x is a placeholder for each array element? why doesn't this kind of for-loop need a termination condition?
-