Cannot perform math on returned value from Number Edit BoxI'm trying to run a very simple script that requests a numerical input from the user. Unfortunately, I cannot perform numerical operations such as subtract and divide on the returned value. Am quite new to jsl, so I must be doing something wrong that must be very simple to correct. the error message is:
"Cannot convert argument to a number [or matrix] in access or evaluation of 'Divide', minfeat_abs/ /*###*/1000/*###*/"
Any help would be greatly appreciated. Have been banging away at this for hours.
Please see the script below:
win = New Window( "Feature Depth" ,
<<MODAL></MODAL>
ScriptingRe: Cannot perform math on returned value from Number Edit BoxStill getting an error, even when I copy and past the script that Thierry suggested.
deleted object reference: NEB << get in access or evaluation of 'Glue'...

Re: Cannot perform math on returned value from Number Edit BoxDear all,
I think this does not work, because with closing the window, the variable and the scope has gone. JMP returns it in a different way. A global variable may work.
So when I struggle with these kind of things, I tend to look in the scripting index for the current way to do this kind of things (they may change somehow from version to version). And I find it as an example for "new window, modal", that I slightly modified, see screenshot and attached script. The reference of the window returns all you need.
Names Default To Here( 1 );
ex = New Window( "Dialog() example",
<<MODAL></MODAL>

Re: Cannot perform math on returned value from Number Edit BoxTry this:
win = New Window( "Feature Depth" ,
<<MODAL></MODAL>
I think it has something to do with the <