Hello - I've got this confusing issue where I have a nested number edit box, and for some reason its not sending the entered number into the variable I've got it set to. I tried selecting and running only that line, and low-and-behold it sends the info to the variable, but for some reason in context, it refuses to do it. I actually got it to work a while ago, but then I went to bed, got up, didn't change a thing before it (I changed the script it calls as well as added a couple of "write to column" lines farther down), and this happened, so I'm a bit confused. Here's the code up to the <
Clear Symbols();
w = New Window( "Choose Row Number for XRD Run input", // opens a window with a title and this content...
Border Box( top( 20 ), bottom( 20 ), Left( 20 ), Right( 20 ), // window dressing
V List Box( // V and H lists nest to organize the display boxes
H Center Box( Text Box( "Choose Row Number for XRD Run input" ) ), // a second title, centered
Spacer Box( size( 1, 30 ) ), // a little vertical space
H Center Box( rowtemp = Number Edit Box( 116 ) ), // data entry
Spacer Box( size( 1, 10 ) ), // a little vertical space
H Center Box( // center the button
Button Box( "Import Smaple Data", // this script runs when the button is pressed...
rownumber = rowtemp << Get;Also, side question, but when I get to the w << close window statement, it says
Send Expects Scriptable Object in access or evaluation of 'Send' , w << /*###*/closeWindow/*###*/
, which confuses me, because again, this worked earlier, and it also follows the syntax correctly. If anyone knows why that's happening, that would be helpful too.
Thanks in advance.
I would set the value within the Number Edit Box using a <
Clear Symbols();
w = New Window( "Choose Row Number for XRD Run input", // opens a window with a title and this content...
Border Box( top( 20 ), bottom( 20 ), Left( 20 ), Right( 20 ), // window dressing
V List Box( // V and H lists nest to organize the display boxes
H Center Box( Text Box( "Choose Row Number for XRD Run input" ) ), // a second title, centered
Spacer Box( size( 1, 30 ) ), // a little vertical space
H Center Box(
rowtemp = Number Edit Box(
116,
10,
<<SETFUNCTION></SETFUNCTION>@txnelson Thanks for the suggestion! I've added it in.
Unfortunately it didn't do much. My firewall is blocking the debugger for some reason, so I had to resort to wait/show commands, and realized I was less familliar with the Clear Symbols() function than I thought. My called script started with a clear variables command, so that accounted for the killing of the rownumber variable, as well as the w << Close Window command not working, as "w" was being removed as well.
Methinks I don't understand namespaces enough.
Thanks for the help!
In very short for namespaces:
- Start all your scripts (always) with Names Default To Here(1);
- Don't leave Clear Symbols(), Clear Globals(), Delete Symbols() or Delete Globals() to any (production) scripts as they can potentially mess up whole JMP session (use them only for debugging).
And both of these are good reads: Global and Local Variables (jmp.com) and Rules for Name Resolution (jmp.com) (remember to check also subtopics)