I think your Try doesn't work because << Get doesn't rise an error when used with ListBoxBox (just a message to log). If you want to get values this way, you could for example use << Class Name:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
New Window("Col List Box Example",
V List Box(
var1 = Combo Box({"one", "two", "three"}),
H List Box(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(
If(expr.temp1 << class name == "ComboBox",
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); //AA = {1, {"height"}};
I would usually suggest not getting the values like this and try to figure some other way than dynamically creating variable names (storing references to list or associative array for example).
-Jarmo