07-06-2010 08:38 PM
Hello All
Can anybody tell me how to set up a number of arrays (string and number inputs) which uses the index control of one of the arrays to rollover all the other arrays
Thanks for your help guys
Solved! Go to Solution.
07-06-2010 08:46 PM - edited 07-06-2010 08:47 PM
Create "Index Values" write property nodes for each of the arrays, and have them all wired to a common control. Note that the "IndexVals" property nodes are array... this is because generically, an array has 'n' dimensions and therefore 'n' index values. Since you are interested in only a 1D array, there is only 1 element needed for the IndexVals property.
07-06-2010 09:07 PM
Thanks Jack
I'm having trouble creating the property nodes you suggested.......can you give me a hint
Ray
07-06-2010 09:50 PM
Right click on the array to bring up the Context Menu. Then, "Create >> Property Node >> Index Values"
07-06-2010 09:55 PM
Thanks again Jack
I'm going to give that the "big thumbs up".
I was using the steps you mentioned, but when you right click on the wrong part of the array, it doesn't show the "index values" selection........my bad!!
07-07-2010 01:09 AM
OK, let's backup for a second. Things would be much simpler if you would use more appropriate data structures!!!!
If the arrays indices need to be synchronized, I would assume that all arrays must have the same length.
One solution (similar to Jack's above) would be to only show one of the indices, so only that one can be operated and drag the other, hidden one along programmatically using property nodes. (See attached example on the left)
Still.....Why do all that song and dance with (unneeded) property nodes and things only work as expected at run time? Wouldn't it be more reasonable to change to a different data structure? Why not convert it to an array of clusters, each cluster containing the two elements. Now there is naturally only one index and the two visible elements are always perfectly matched, even at edit time!
(See attached example on the right).
It would be trivial to convert between the two data structures if needed by the rest of the program. Try it!
07-07-2010 08:09 AM
I agree with altenbach. If you're able to change the data structure, it's always good to get rid of a polling property node. Also, the user interface is typically cleaner and more coherent. Also, keep in mind that once you do this, you can expand the array to show, say, 5 or 10 elements, then right-click on the border of the array and select "Visible Items >> Vertical Scrollbar"