基本上我正在構建一個包含不同顯示框的自定義交互式窗口,並且我正在嘗試使用 for 循環來簡化選擇輸入。 例如,我有一個組合框和一個 collistbox,我正在嘗試使用循環語句獲取兩者的輸入。 但是當我這樣做時,我得到了一個錯誤。 我寫的表達式不正確嗎? (附錯誤日誌)
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);