Choose Language Hide Translation Bar
Highlighted
SamKing
Level III

Check Box and radio box no longer working with JMP15?

I have a script that has been working well for myself and others on JMP14.  One person upgraded to JMP15 and now it throws errors.  I made the mistake of upgrading also get the same issue and I can't find a work around.  I ultimately need the options assigned to a variable for the radio box and a list for the check box.  The best I've been able to do now is assign the option 

 

Can someone check my code and let me know what might be wrong?  Obviously I changed my options to remove my work related stuff.

PUB = {};
PUB = New Window( "Analysis Options",<<Modal,<<return result,
panelbox("What is wanted?",
Vlistbox(
textbox("Technode: "), PersonChoice = Radio box({"Jack", "Jill"}),
textbox("Analysis: "), DrinkChoice = Check Box( {"Water", "Beverage", "Moonshine"} ),
Spacer Box( size( 20, 10 ) )
)));
Person = PersonChoice << get selected; //This no longer works on JMP15
Drink = DrinkChoice << get selected; //This no longer works on JMP15

Here is the message that I get on JMP15 but again it runs fine on JMP14.

SamKing_0-1583525685043.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Ryan_Gilmore
Community Manager Community Manager

Re: Check Box and radio box no longer working with JMP15?

The following worked for me in JMP 15,

 

PUB = {};
person = Empty();
drink = Empty();
PUB = New Window( "Analysis Options",
	<<Modal,
	<<return result,
	<<on close(
		person = PersonChoice << get selected;
		drink = DrinkChoice << get selected;
	),
	Panel Box( "What is wanted?",
		V List Box(
			Text Box( "Technode: " ),
			PersonChoice = Radio Box( {"Jack", "Jill"} ),
			Text Box( "Analysis: " ),
			DrinkChoice = Check Box( {"Water", "Beverage", "Moonshine"} ),
			Spacer Box( size( 20, 10 ) )
		)
	)
); 

Show( person, drink );

It assigns the value prior to the window closing using the On Close event. At this point, the radio box and check box objects still exist so you will not get the error.

 

I did not test this in JMP 14.

 

View solution in original post

3 REPLIES 3
Highlighted
Ryan_Gilmore
Community Manager Community Manager

Re: Check Box and radio box no longer working with JMP15?

The following worked for me in JMP 15,

 

PUB = {};
person = Empty();
drink = Empty();
PUB = New Window( "Analysis Options",
	<<Modal,
	<<return result,
	<<on close(
		person = PersonChoice << get selected;
		drink = DrinkChoice << get selected;
	),
	Panel Box( "What is wanted?",
		V List Box(
			Text Box( "Technode: " ),
			PersonChoice = Radio Box( {"Jack", "Jill"} ),
			Text Box( "Analysis: " ),
			DrinkChoice = Check Box( {"Water", "Beverage", "Moonshine"} ),
			Spacer Box( size( 20, 10 ) )
		)
	)
); 

Show( person, drink );

It assigns the value prior to the window closing using the On Close event. At this point, the radio box and check box objects still exist so you will not get the error.

 

I did not test this in JMP 14.

 

View solution in original post

Highlighted
SamKing
Level III

Re: Check Box and radio box no longer working with JMP15?

Thanks for the quick reply. It works in both JMP14 and JMP15. Much appreciated.
Highlighted

Re: Check Box and radio box no longer working with JMP15?

Setting up the expression to be evaluated when the window is closed by any method is very useful. In this case, you could also provide an OK and Cancel button to dismiss the window like a built-in dialog box.

 

Names Default To Here( 1 );

PUB = New Window( "Analysis Options",
	<< Modal,
	<< Return Result,
	Panel Box( "What is wanted?",
		V List Box(
			Text Box( "Technode: " ),
			Person Choice = Radio Box( {"Jack", "Jill"} ),
			Text Box( "Analysis: " ),
			Drink Choice = Check Box( {"Water", "Beverage", "Moonshine"} ),
			Spacer Box( size( 20, 10 ) )
		)
	),
	H List Box(
		Button Box( "OK",
			person = Person Choice << Get Selected;
			drink = Drink Choice << Get Selected;
		),
		Button Box( "Cancel" )
	)
); 

Show( person, drink );
Learn it once, use it forever!
Article Labels

    There are no labels assigned to this post.