Coming back to the start of the discussion - the difference between the green play icon and the "run" button of the edit window:
@Byron_JMP wrote:
They generally do the same thing.
The little green arrow is faster, one click.
: )
the issue boils down to the finding that there is not ONE well define current data table()!
Using the green play button and checking the result windows, one can see the following sequence:
1) the AddIn opens test and reports that current data table was changed to test
2) the main table still thinks that check_current_data_table is the current data table (!!!)
3) After the wait(0) it knows better and returns test.
On the other hand - if the script is started via the RUN button in the edit window - all 3 result windows show the same table as current data table().
main script:
Names Default To Here( 1 );
Main Menu( "load_" );
win = new window("1 ",Text Box ("main table (1):\!n" ||
(current data table() << get name())));
wait(1);
win = new window("2 ",Text Box ("main table (2):\!n" ||
(current data table() << get name())));
load_:
Names Default To Here( 1 );
dt = open("C:\temp\test.csv");
Caption( {100, 200}, "postprocessing ...");
win = new window("addIn", text box("inside the addin:\!n" ||(current data table()<< get name())));
// win << moveWindow( 100, 100 );
Caption( remove );
Digging deeper, one finds out that tiny details like enabling the << moveWindow inside the AddIn or disabling one of the caption commands have an effect on the behavior.