Depending on how your application will work, it might be better not to append values to a list until user press run / ok button, as users might want to remove values from the list box (not currently possible).
I added Run button and runExpr to this example (if you don't have JMP16, you can modify Transform Each into a For loop which will append values to a list), remove button and clearing of col list box selections when Match is pressed:
Names Default To Here(1);
matchedList = {};
dt = New Table("Untitled 5",
Add Rows(4),
Set Header Height(46),
New Column("X", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3, 4])),
New Column("A_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([1, 3, 2, 3])),
New Column("B_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 6, 5])),
New Column("A_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([1, 4, 3, 4])),
New Column("B_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 3, 4]))
);
notImplemented = Expr(
a = (clb1 << get selected)[1];
b = (clb2 << get selected)[1];
clb1 << Clear selection;
clb2 << Clear selection;
lb << Append(a || "=" || b);
);
notImplemented2 = Expr(
lb << Remove Selected;
);
runExpr = Expr(
lb << get items;
lb_values = Transform Each({val}, lb << get items, Words(val, "="));
show(lb_values);
);
gui = Expr(
H List Box(
V List Box(
Panel Box("Theory",
clb1 = Col List Box(All, Nlines(5))
),
Panel Box("Experiment",
clb2 = Col List Box(All, Nlines(5))
)
),
Panel Box("Theory vs Experiment Matching",
H List Box(
Lineup box(N Col(1),
Button Box("Match", notImplemented),
Button Box("Remove", notImplemented2),
),
lb = List Box({}, Nlines(12))
)
),
Panel Box("Actions",
Button Box("Run",
runExpr;
)
)
)
);
fileLoad = New Window("Example", Show Menu(0), Show Toolbars(0), gui);
-Jarmo