Using the below JSL, here is what I have discovered.
Names Default To Here( 1 );
f2 = Function( {Temp_list},
T_list = Get Data Table List();
lb << remove all;
lb << append( T_list );
show("Close");
);
f1 = Function( {Temp_list},
T_list = Get Data Table List();
lb << remove all;
lb << append( T_list );
show("add");
);
asub = Subscribe to Data Table List( , onopen( f1 ) );
Subscribe to Data Table List(asub , onclose( f2 ) );
nw = New Window( "Trial",
Show Menu( 0 ),
V List Box(
T_list = Get Data Table List();
lb = List Box( T_list );
)
);
- The created list box will Add new data tables without error.
- The f1 function is executed once for each addition
- If you close a data table, it will not be removed from the list box.
- If you close a second data table, the previous closed data table will be removed from the list box.
- If you close the list box and run the JSL for a second time, and close a data table, an f2 function will be run twice. The f2 function from the first running of the JSL will be run, followed by the running of the second instance of the f2 function. This can be shown by changing the Show() statement. If the Show statement was changed from
Show( "Close" );
to
Show( "Close 2" );
upon closing a data table, both versions of the Show() statement will be displayed,
- Subsequent executions of the JSL add additional copies of the f2 function, with each copy being executed for each data table closing.
- Clear Globals and Clear Symbols does not eliminate the previous versions of the f2 function.
This is clearly a JMP bug and needs to be sent into the JMP Support Staff.
I have submitted the bug to them.
Jim