cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
jheadley
Level I

JMP15 modal window with check box behavior

OK so I have code that worked fine in JMP 14, it went like this:

 

ithead = "EAR Configuration for Factor Cross Plots";
itprompt = "Select to Include EAR warning on Factor Cross Plots.";
itwarn =
"WARNING – This document contains technical data classified under the Commerce Control List and assigned Export Control Classification Number (ECCN) 0A606.x and 0E606. ";

//determine if itar/ear warning is required
itwin = New Window( ithead,
	<<Modal,
	H List Box( check1 = Check Box( itprompt, ), H List Box( "" ) ), 

);
itar = check1 << Get;
Show( itar );

 

I see that now basically all the instances in my code where I try to get the output of a window after it closes don't work anymore in JMP15, and you can use On Close or on Validate to get most things working.  This has worked for me with text boxes and On Close.  In this case, I tried:

 

 

ithead = "EAR Configuration for Factor Cross Plots";
itprompt = "Select to Include EAR warning on Factor Cross Plots.";
itwarn =
"WARNING – This document contains technical data classified under the Commerce Control List and assigned Export Control Classification Number (ECCN) 0A606.x and 0E606.";
//determine if itar/ear warning is required
itwin = New Window( ithead,
	<<Modal,
	H List Box( check1 = Check Box( itprompt, ), H List Box( "" ) ),
	<<On Validate( itar = check1 << Get ),

);
Show( itar );

 

If I use On Validate, I get the following error:

 

Object 'EvalContextBox' does not recognize the message 'On Validate'; perhaps you mean one of these: <<Inval Size <<Inval <<Journal <<Copy Data <<On Close <<Journal Window <<Horizontal Alignment <<Enabled.

If I use On Close and don't choose the check box - there is no way to close the modal window.  Choosing OK does nothing and the X in the corner will also not close the modal window.  If I choose the check box, it returns 1 and works correctly.  If I choose the check box and then unchoose it, the window won't close.  How do I get a 0 value to return and be able to close the window?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Jeff_Perkinson
Community Manager Community Manager

Re: JMP15 modal window with check box behavior

Try the <<Return Result message to get a list of the results of the dialog.

 

 

itwin = New Window( ithead,
	<<Modal,
	<<Return Result,
	H List Box( check1 = Check Box( itprompt, ), H List Box( "" ) ), 

);
show(itwin);

Log (when check box was checked):

itwin = New Window( ithead,
	<<Modal,
	<<Return Result,
	H List Box( check1 = Check Box( itprompt, ), H List Box( "" ) ), 

);
show(itwin);

/*:

itwin = {check1 = {1}, Button(1)};

 

-Jeff

View solution in original post

txnelson
Super User

Re: JMP15 modal window with check box behavior

I think your best solution, is to place the action to set variable itar, in a script that is executed when the check box is selected or unselected

ithead = "EAR Configuration for Factor Cross Plots";
itprompt = "Select to Include EAR warning on Factor Cross Plots.";
itwarn =
"WARNING – This document contains technical data classified under the Commerce Control List and assigned Export Control Classification Number (ECCN) 0A606.x and 0E606.";
//determine if itar/ear warning is required
itar = .;
itwin = New Window( ithead,
	<<Modal,
	H List Box( check1 = Check Box( itprompt,itar = check1 << Get ), H List Box( "" ) ),
	

);
Show( itar );
Jim

View solution in original post

4 REPLIES 4
Jeff_Perkinson
Community Manager Community Manager

Re: JMP15 modal window with check box behavior

Try the <<Return Result message to get a list of the results of the dialog.

 

 

itwin = New Window( ithead,
	<<Modal,
	<<Return Result,
	H List Box( check1 = Check Box( itprompt, ), H List Box( "" ) ), 

);
show(itwin);

Log (when check box was checked):

itwin = New Window( ithead,
	<<Modal,
	<<Return Result,
	H List Box( check1 = Check Box( itprompt, ), H List Box( "" ) ), 

);
show(itwin);

/*:

itwin = {check1 = {1}, Button(1)};

 

-Jeff
jheadley
Level I

Re: JMP15 modal window with check box behavior

I didn't know about the return result option - always good to learn new tricks, thanks.
txnelson
Super User

Re: JMP15 modal window with check box behavior

I think your best solution, is to place the action to set variable itar, in a script that is executed when the check box is selected or unselected

ithead = "EAR Configuration for Factor Cross Plots";
itprompt = "Select to Include EAR warning on Factor Cross Plots.";
itwarn =
"WARNING – This document contains technical data classified under the Commerce Control List and assigned Export Control Classification Number (ECCN) 0A606.x and 0E606.";
//determine if itar/ear warning is required
itar = .;
itwin = New Window( ithead,
	<<Modal,
	H List Box( check1 = Check Box( itprompt,itar = check1 << Get ), H List Box( "" ) ),
	

);
Show( itar );
Jim
jheadley
Level I

Re: JMP15 modal window with check box behavior

this is the approach I ended up using - most direct. thanks!