JMP community expert, I'm from China.
The following problem description comes from machine translation. Please don't mind that the grammar can be a little strange.
I am encountering some issues with a potential bug in the JMP17 script. I would appreciate it if you could seek assistance from the experts to address this matter.
I have created a script for "Graph Builder". In order to automatically close the referenced data table when the Graph Builder is closed, I have added the following script using On Close():
gb << On Close( Close( gb << Get Data Table, nosave ) );
But since I have a lot of data tables and need to generate graphs simultaneously through the for() loop, I optimized the following script:
Eval( Eval Expr( Expr( gb ) << On Close( Close( Expr( gb ) << Get Data Table, nosave ) ) ) );
However, an unexpected issue arose. While there were no problems running the script normally, when I encrypted and ran it, an exception was reported upon closing the graph, which has left me quite perplexed.
The following is a complete test script. Your help in analyzing this problem would be greatly appreciated.
Names Default To Here( 1 );
fileList = {"big class.jmp", "Big Class Families.jmp"};
For Each( {file, i}, fileList,
dt = Open( Eval Insert( "$sample_data/^file^" ), "invisible" );
gb = dt << Graph Builder(
Size( 917, 645 ),
Variables( X( :sex ), Y( :height ) ),
Elements(
Points( X, Y, Legend( 5 ) ),
Box Plot( X, Y, Legend( 6 ) ),
Caption Box( X, Y, Legend( 9 ), Summary Statistic( "Mean" ), Location( "Graph per factor" ), X Position( "Left" ) )
),
SendToReport(
Dispatch( {}, "Points", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Box Plot", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Caption Box", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Caption Box", Outline Box( 2 ), {Close( 1 )} )
)
);
Eval( Eval Expr( Expr( gb ) << On Close( Close( Expr( gb ) << Get Data Table, nosave ) ) ) );
);