Value Listener for Array elements

Hi there,

I have an Array held in some GUI class whose elements gets updated on user component changes.

I have another class listening for changes in this array which seems to only work if I declare a Value for each element in the Array as a member and make this array as a “Array< Value >”.

Is there another approach to this because the number of elements in this Array must be set by the user - variable.

I’d like to avoid using button attachments as the Array is changed via mouse interaction on components. That is, I only need one listener for many components that change their corresponding element in the array.
p.s. I’m no advanced programmer.

Many thanks in advance.
contains all the concepts you’re looking for. adapt the concepts to your needs.

I have already looked into this.
But I don’t know how to get this to listen to an array.
This tutorial only covers how to have this listen to pre-made attachment objects.

don’t use an array. use a ValueTree to hold your values.

1 Like

That’s it, exactly where I should have been looking as the tutorial does more than I need.
Many thanks for your help!