Hi JMP community:
I save 2 scripts into add-ins, and bug will happen in certain situation, the scripts work as following:
- The first add-in will create a new table and create several new columns, let's call this new table as "calculate table"
- Next I will run the second add-in in "calculate table", it will require to open another existing file (let's call it "raw data table"), then get data from "raw data table" and input something into the "calculate table"
//This is the first script
Names Default To Here( 1 );
New Table( "Calculate table");
dt = current data table();
newcolumn = {"X", "Y"};
for each({colval},newcolumn,
dt << new column(colval);
);
//This is the starting lines of 2nd script
Names Default To Here( 1 );
dt = current data table();
file = Pick file( "Select raw data table" );
if(is empty(file),
show("No file selected");
stop();
);
Try(
dt2 = open(file);
,
show("No file selected");
stop();
);
// The following code are not shown here
Situation without bug:
- If I open any data table, run the 1st add-in, then run 2nd add-in in the new table, it works
Situation with bug:
- If I run the 1st add-in directly in JMP home page, then run 2nd add-in, the 2nd add-in will have bug
Basically what the 2nd add-in does is to get data and column formula from "raw data table", and input into "calculate table", then create a new window with slider box. The slider box won't work when bug happen, but get data and formula still works