Hello,
I create windows in a loop following columns. For example, in the JSL example below, I create a window with the distribution and a button that temporarily hides the window for each column (Age, Weight). The problem is that as my loop progresses, my object variables are overwritten by the last window.
For example, in the age window generated by the example, clicking on the button is supposed to temporarily hide the Age window, but in reality it hides Weight because it has been overwritten.
Is it possible to do a names default to here or something like that so that each window has its own independent space without having to change the name of the variables for each window every time? Because I have a lot of them...
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
lstCols = {"age", "weight"};
For Each( {value, index}, lstCols,
colref = Column( value );
window = New Window( "Window - " || value,
V List Box(
distribution = dt << Distribution( Column( colref ) ),
Button Box( "Hide",
window << show window( 0 );
Wait( 2 );
window << show window( 1 );
)
);
);
);