I have a dialog where I need a user to match pairs of columns. Pretty much like we do in Join Tables.
2022-03-25 11_51_23-Clipboard.png
Specific example - I have sets of experimentally measured parameters and sets of their theoretical predictions. This data comes from different sources and colum naming can be arbitrary, so I need users to match theory vs experiment for each parameter.
Is there an example on how to script this part? And how to keep these pairs and how to use them later?
So far I have this, and I'm interested in how to script the box in green frame to reflect matched pairs (like in example above) and how to keep those pairs (list of 2 item lists?) and how to remove\recall them etc.:
2022-03-25 11_42_16-Clipboard.png
And here is the script:
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(
win = New Window( "Feature Not Implemented Yet", <<Modal, Button Box( "OK" ) )
);
gui = Expr(
H List Box(V List Box(Panel Box("Theory",Col List Box(All, Nlines(5))),Panel Box("Experiment", Col List Box(All, Nlines(5)))), Panel box("Theory vs Experiment Matching",H List Box(Button Box("Match", notImplemented), List Box({}, Nlines(12)))) )
);
fileLoad = New Window( "Example",
Show Menu( 0 ),
Show Toolbars( 0 ),
gui
);