Hi,
One relatively efficient way to do this is as follows.
1) Define parameter/value sets in AAs, one AA for each option.
2) Place these AAs in a "main" AA.
3) Use the combobox to select within the "main" AA
4) For any selection, surface a single tablebox (after deleting the current one, if present), whose rows correspond to entries in the relevant option AA.
5) When the "go" button is pressed, it is easy to update the relevant "option" AA with whatever entries have been made, and proceed. Here, the mainAA is written to the log so you can see its contents after each press.
Cheers,
Brady
Names Default To Here( 1 );
AAopt1 = Associative Array( Words( "p1,p2,p3", "," ), {1, 2, 3} );
AAopt2 = Associative Array( Words( "p1,p4", "," ), {1, 10} );
AAopt3 = Associative Array( Words( "p2,p5,p6,p7", "," ), {2, 6, 12, 20} );
MainAA = Associative Array( Words( "option1,option2,option3", "," ), Eval List( {AAopt1, AAopt2, AAopt3} ) );
nw = New Window( "xx",
V List Box(
cb = Combo Box(
mainAA << get keys,
Try( TB << delete );
tableVLB << append(
tb = Table Box(
TbSCB = String Col Box( "parameter", mainAA[cb << get selected] << Get Keys ),
TbNCEB = Number Col Edit Box( "value", mainAA[cb << get selected] << Get Values )
)
);
),
tableVLB = V List Box(),
bb = Button Box( "Go",
mainAA[cb << get selected] = Associative Array( TbSCB << get, TbNCEB << get );
Show( mainAA );
)
)
);
eval(cb << get function);