Problema
Has abierto una tabla para mostrar un informe. La tabla puede ser temporal o invisible, y desea que la tabla desaparezca en silencio cuando se cierre el informe.
Solución
Utilice el método << OnClose para adjuntar una secuencia de comandos al informe. Hacer que el script cierre la mesa.
// make a table
dt = New Table( "Temporary",
Add Rows( 1e6 ),
New Column( "x", Formula( Random Normal( 50, 30 ) ) ),
New Column( "y", Formula( Random Normal( 50, 30 ) ) ),
"Invisible"
);
// now make sure the formulas have finished evaluating
dt << RunFormulas;
// then clear the flag that says the table has changes that need to be saved
dt << SetDirty( 0 );
// finally, create a platform (or other window) with an OnClose script.
// the try() captures a message that might happen if the table is
// closed, causing the platform to close, causing the table to close...
dt << Bivariate( Y( :y ), X( :x ), <<ONCLOSE></ONCLOSE>
Platform with <<OnClose event attachedPlataforma con << evento OnClose adjunto
Discusión
Puede usar la ventana de inicio para hacer visible la tabla de datos invisibles. Es posible que se necesiten << RunFormulas antes de << SetDirty (0) para asegurarse de que la evaluación de la fórmula de fondo no marque la tabla, otra vez. El "nosave" también evitará la solicitud de la tabla sucia, pero no si el usuario cierra la tabla en lugar del informe.
Ver también
http://www.pega-analytics.co.uk/blog/housekeeping/