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

JMP 15 Modal Number Edit Box Quirks

OK so I have the following number edit box that worked fine in JMP14, but I can't use the <<Get after the box declaration anymore.

 

I tried this:

savechoice = 1;

pfp = New Window( "Save Models and Columns",
	<<Modal,
	Text Box(
		"Would you like to save the predicted formula columns and fit model? Please review them before you answer."
	),
	Text Box( "Enter 1 for Yes, 0 for no." ),
	H List Box( Num2 = Number Edit Box( 1 ) ),
	Text Box( "" ),
	<<On Close( savechoice = Num2 << Get )
);

Show( savechoice );

 

 

But if I type 0 into the box to say "don't save" it won't let me close the box.  It's like 0 isn't a valid input for a number edit box.  If I type 1,2, or any other number it works fine.  What is going on?  thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: JMP 15 Modal Number Edit Box Quirks

Here is the preferred method with a Number Edit Box.  See the Scripting Index on the Set Function message in the Number Edit function

savechoice = 1;

pfp = New Window( "Save Models and Columns",
	<<Modal,
	Text Box(
		"Would you like to save the predicted formula columns and fit model? Please review them before you answer."
	),
	Text Box( "Enter 1 for Yes, 0 for no." ),
	H List Box( Num2 = Number Edit Box( 1, 10,
		<<SetFunction(
			Function( {this}, /* put my value into my sibling's display */
				savechoice = this << getText )
			)
		)
	),
	Text Box( "" )
);

Show( savechoice );
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: JMP 15 Modal Number Edit Box Quirks

Here is the preferred method with a Number Edit Box.  See the Scripting Index on the Set Function message in the Number Edit function

savechoice = 1;

pfp = New Window( "Save Models and Columns",
	<<Modal,
	Text Box(
		"Would you like to save the predicted formula columns and fit model? Please review them before you answer."
	),
	Text Box( "Enter 1 for Yes, 0 for no." ),
	H List Box( Num2 = Number Edit Box( 1, 10,
		<<SetFunction(
			Function( {this}, /* put my value into my sibling's display */
				savechoice = this << getText )
			)
		)
	),
	Text Box( "" )
);

Show( savechoice );
Jim
jheadley
Level I

Re: JMP 15 Modal Number Edit Box Quirks

thanks. Still seems like a ton of characters for what used to be simply a Num2<<Get; that I would put after the window box. I have no idea why they changed all of this in JMP15 but it is driving a ton of work for me.