does anyone know why the values in an array will not output to a scrollField in a mel GUI?
If I use the print command on the array variable all of the stored values print to the script window fine, but if the variable is passed onto a scrollField command using -text $text, it only shows the first value of the array.
I'm just trying to remember off the top of my head, but I recal that for each element in your array, you need to assign it to a new line in the scrollField. This is easily done with a loop.
thanks for the tip - I'm trying it out now, but without success - can't get the scrollfield to update - I'm getting the last iteration of the array to show instead of the first. If you've got time please have a look at my attempt and pick it to pieces:
this is the loop ($text is the array, $scrolltext is the variable I'm trying to feed into the scrollField) string $scrolltext; int $a; for ($a = 0; $a < (size($text)); $a++)
{ $scrolltext = $text[$a]; }
and then fed into scrollField (i'm using formlayout so the scrollField is defined as a variable first before being attached to the form):