In JMP, closing a custom window with an <<On Close() argument can cause JMP to crash. The problem occurs on Windows operating systems.
Example - the following code can cause the crash:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
win = New Window( "Test",
<<On Close( Close( dt, No Save ) ),
dist = Distribution( Continuous Distribution( Column( :height ), Horizontal Layout( 1 ) ) )
);
To work around the problem, use the Schedule() function to schedule the data-table close.
Example - use this code instead of the code above:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
cleanup = Function( {},
Eval( Expr( sch << Close() ) );
Close( dt, No Save );
);
win = New Window( "Test",
<<On Close( sch = Schedule( 0, cleanup() ) ),
dist = Distribution( Continuous Distribution( Column( :height ), Horizontal Layout( 1 ) ) )
);
[Previously JMP Note 63410]