Hi all,
I just encountered 2 problems with my script in a Modal Window which used to be working fine in JMP14 but as soon as I moved over JMP16, these 2 problems were found:
1) There's an error message came out stating "deleted object reference: cc << Get Selected in access or evaluation of 'Glue',....."
2) "Cancel" button shows an error " Name Unresolved: Button in access or evaluation of 'Button', Button (-1) /*###*/ "
Below is a simplified script that is working fine in JMP14 but not in JMP16. If working correctly, the script will create a New column ("Result") stating "Pass" if the checkbox is checked, but a "Fail" if the checkbox is unchecked. About the "Cancel" button, if working properly, there'll be no error message when clicked, where it will close the Modal Window.
Names Default To Here( 1 );
dt = Current Data Table();
win = New Window( "User Input",
<<Modal,
Lineup Box( N Col( 1 ),
cchk = {"Pass"};
Panel Box( "Result",
cc = Check Box( cchk ),
cc << Set( 1, 1 ),
Spacer Box( Size( 1, 0 ) )
);,
H List Box( Spacer Box(), Button Box( "OK" ), Button Box( "Cancel" ) ),
)
);
If( win["Button"] == -1,
win << Close Window
);
ctc = cc << Get Selected;
dt << New Column( "Result", character, nominal );
If( Contains( ctc, "Pass" ),
dt:Result << Set Each Value( "Pass" )
,
dt:Result << Set Each Value( "Fail" )
);