Basically I'm building a custom interactive window which includes different display boxes and I'm trying to simplify the selection input with a for loop. For instance, I have both a combobox & a collistbox and I'm trying to get input for both using a loop statement. But when I did this, I got an error instead. Am I writing the expression incorrectly ? (error log attached)
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Col List Box Example",
vlistbox(
var1 = combobox({"one", "two", "three"}),
hlistbox(Col List Box( all, width( 250 ), maxSelected( 1 ) ),
var2 = Col List Box()
)
)
);
var2 << append("height");
AA = {"",""};
for(i=1,i<=2,i++,
temp1 = "var"||char(i);
eval(
substitute(
expr(try(AA[i] = expr.temp1 << get, AA[i] = expr.temp1 << get items)), //try to use get, if error, use get items
expr(expr.temp1),parse(temp1)
)
)
);
show(AA);