Hi there,
I'm trying to change buttons labels in a matrix, with a Custom Module.
Until now, it's working with buttons widgets. And i'm trying to use now a matrix.
Here's a part of the code, working with button's widgets :
ConstruisTaMap().then(cequilmefaut => {
var buttons = {'b1': '/b1/show','b2': '/b2/show',....};
var labels = {'b1': '/b1/label','b2': '/b2/label',....};
var TousmesBoutons=mesArticulations.length;
var labelTexts = Object.values(mesArticulations);
for (var i = 0 ; i<TousmesBoutons;i++)
{
var label = mesArticulations[i];
receiveOsc({address: Object.values(buttons)[i], args: [{type: 'i', value: 1}]});
receiveOsc({address: Object.values(labels)[i], args: [{type: 's', value: label}]});
}
So, i tried a few thing, like :
receive('/EDIT', 'matrix_1', {'props': {'id':'b#{$+1}','label':labelTexts}});
Which returns, as expected, the whole array :
In the for loop, i tried to use [i], but as expected too, it can't work this way, it ends up showing only the last item in every buttons...
I tried to use matrix_1/INDEX
as a children id in the receive function, as found somewhere here, but no result.
I tried using JS{} in the receive function :
receive('/EDIT', 'matrix_1', {'props': {JS{var props = {}....}});
But i have token errors...
So here am i... lost again...
h.. e.. l.. p.. p.. l.. e.. a.. s.. e..