Hello,
I try to add several Outline Boxes to a window with parameters which are stored in lists. I use a For-Loop to append the boxes. For the title this works just fine. However, if I draw lines it does not work. Below is a minimal example which I would like to get to work.
I'm thankful for any idea what I should change and what I'm doing wrong.
Best,
Anja
::lineList = {10, 20, 30};
::titleList = {"Title 1", "Title 2", "Title 3"};
w = New Window("My Test Window", myBox = Outline Box("My Test"));
For(i = 1, i <= 3, i++,
myBox << Append(Outline Box(titleList[i], Graph Box(H Line(lineList[i]))))
);
You can check how your Graph Box looks like by opening Customize menu
You can see that the value isn't there but rather variablename. You can for example use Eval(EvalExpr()) to avoid that issue
Names Default To Here(1); lineList = {10, 20, 30}; titleList = {"Title 1", "Title 2", "Title 3"}; w = New Window("My Test Window", myBox = Outline Box("My Test")); For(i = 1, i <= 3, i++, Eval(EvalExpr( myBox << Append( Outline Box(titleList[i], Graph Box( H Line(Expr(lineList[i])) ) ) ) )) );
Thank you very much! Now it works just fine as I would like it.