You need to defer filling in the VLB until the button is pressed. Also, you can use the Platform()
function to help with table scoping (speaking of scoping, you can use the window
pseudo-namespace to help with scoping)
New Window( "Test",
Modal
,
Button Box( " Click to Open",
window:dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
window:vlb << Append(
Platform( window:dt,
window:obj = window:dt << Graph Builder(
Variables( X( :Sex ), Y( :Height ), Group X( :Age ) ),
Elements( Box Plot( X, Y ) )
)
)
)
)
,
window:vlb = V List Box()
);
Jordan