Create a list of properties
-
Hello,
I would like to create a list of properties that I can iterate on.
For example I do have the following properties :property bool myBool1 : false property bool myBool2 : true property int myInt1 : 0 property bool myBool1 : false property int myInt2 : 4
I would like to be able to make a function that take the index of the property and then set the value to that property.
For example :function setData(index, value) { myProperties[index] = value }
How could I achieve that ?
I thought about creating a list of JS element. But I'm not sure it is the best way. What would you recommend if it is possible ?
-
Hello,
I would like to create a list of properties that I can iterate on.
For example I do have the following properties :property bool myBool1 : false property bool myBool2 : true property int myInt1 : 0 property bool myBool1 : false property int myInt2 : 4
I would like to be able to make a function that take the index of the property and then set the value to that property.
For example :function setData(index, value) { myProperties[index] = value }
How could I achieve that ?
I thought about creating a list of JS element. But I'm not sure it is the best way. What would you recommend if it is possible ?