From time to time it would be nice to build user-interfaces which allow user to change datatables which will be used (currently my solution to this, is to "never" add option to change data tables). To my knowledge, you currently will have to re-create filter col selector and col list box to change datatables they use.
This is what I think you have to do:
View more...
This is how I would like it to be done:
View more...
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Probe.jmp", invisible);
dt1 = Open("$SAMPLE_DATA/Big Class.jmp", invisible);
dt2 = Open("$SAMPLE_DATA/Semiconductor Capability.jmp", invisible);
close_dts = Expr(
Try(Close(dt, no save));
Try(Close(dt1, no save));
Try(Close(dt2, no save));
);
change_table = Expr(
cur_table = (lb << get selected)[1];
fcs << Set Data Table(cur_table);
clb << Set Data Table(cur_table);
);
nw = New Window("Col List Box Example",
H List Box(
lb = List Box(Get Data Table List(),
change_table
),
fcs = Filter Col Selector(Datatable(dt)),
clb = Col List Box(Datatable(dt), all, numeric, max selected(1), nlines(5), <<MODELING type=""></MODELING>
Names Default To Here(1); dt = Open("$SAMPLE_DATA/Probe.jmp", invisible); dt1 = Open("$SAMPLE_DATA/Big Class.jmp", invisible); dt2 = Open("$SAMPLE_DATA/Semiconductor Capability.jmp", invisible); close_dts = Expr( Try(Close(dt, no save)); Try(Close(dt1, no save)); Try(Close(dt2, no save)); ); change_table = Expr( cur_table = (lb << get selected)[1]; fcs << Set Data Table(cur_table); clb << Set Data Table(cur_table); ); nw = New Window("Col List Box Example", H List Box( lb = List Box(Get Data Table List(), change_table ), fcs = Filter Col Selector(Datatable(dt)), clb = Col List Box(Datatable(dt), all, numeric, max selected(1), nlines(5), <
This would eliminate the need for unnecessary display boxes and make the reference changing much simpler.