Choose Language Hide Translation Bar
Highlighted
Fiona_Baines
Level I

JMP 15: get function doesn't work with modal windows

If you try this script (obtained from the scripting index in JMP 15)

 

Names Default To Here( 1 );
New Window( "Example",
	<<modal,
	numbox = Number Edit Box( 0 )
);
Print( numbox << Get );

and edit the number box you get this error:

deleted object reference: numbox << Get in access or evaluation of 'Glue' , Names Default To Here( 1 ); /*###*/New Window( "Example",
	<<modal,
	numbox = Number Edit Box( 0 )
); /*###*/Print( numbox << Get ) /*###*/;

This used to work in JMP 13, how do you now get values from editable boxes in JMP 15?

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
txnelson
Super User

Re: JMP 15: get function doesn't work with modal windows

Here is how you need to code your script in JMP 15

Names Default To Here( 1 );
New Window( "Example",
	<<modal,
	numbox =
	Number Edit Box(
		0,
		10,
		<<SetFunction(
			Function( {this},
				numbox = this << get
			)
		)
	)
);
Print( numbox );
Jim

View solution in original post

Highlighted
David_Burnham
Super User

Re: JMP 15: get function doesn't work with modal windows

Alternatively, use <<onClose to grab all your results from the window.  You can also use <<onOpen to intialise values and  <<onValidate to validate inputs.

 

NewWIndow("Example", <<modal,
    <<onClose(
        value = numbox << get;
    ),
    numbox = NumberEditBox(0)
);

 

-Dave

View solution in original post

3 REPLIES 3
Highlighted
txnelson
Super User

Re: JMP 15: get function doesn't work with modal windows

Here is how you need to code your script in JMP 15

Names Default To Here( 1 );
New Window( "Example",
	<<modal,
	numbox =
	Number Edit Box(
		0,
		10,
		<<SetFunction(
			Function( {this},
				numbox = this << get
			)
		)
	)
);
Print( numbox );
Jim

View solution in original post

Highlighted
vince_faller
Super User

Re: JMP 15: get function doesn't work with modal windows

Could also use the return results.  

 

 

Names default to here(1);
nw = New Window( "Example",
	<<modal,
	<<Return Result, 
	numbox = Number Edit Box( 0 )
);
//changed the numbox to 1 show(nw); // {numbox = 1, Button(1)}

 

 

 

 

Vince Faller - Predictum
Highlighted
David_Burnham
Super User

Re: JMP 15: get function doesn't work with modal windows

Alternatively, use <<onClose to grab all your results from the window.  You can also use <<onOpen to intialise values and  <<onValidate to validate inputs.

 

NewWIndow("Example", <<modal,
    <<onClose(
        value = numbox << get;
    ),
    numbox = NumberEditBox(0)
);

 

-Dave

View solution in original post

Article Labels