Hello, I am scripting in JMP Pro Application Builder.
- I have a main window in which I have a button that brings me to a secondary window. Within the secondary window, there are text edit boxes where values are input by the user. Also, there is a close button on this secondary window that saves the values to the appNS and closes the secondary window.
- I have the variables initialized in the main window to have default values of 0. I am having trouble getting the variables to use the updated values from the new window instead of the default values. It prints the default values instantly instead of running the function and then printing the updated values. Any help would be appreciated.
Here are some code snippets for reference (PredictiveModeling is the main window and OptimizeModelWindow is the secondary window):
appNS: ParamList1 = 0;
appNS: ParamList2 = 0;
appNS: ParamList3 = 0;
appNS: ParamList4 = 0;
appNS: ParamList5 = 0;
appNS: ParamList6 = 0;
OptimizeParamsButtonPress = Function( {this}, // This function is called when the OptimizeParams button is pressed on the PredictiveModeling Window
name = this << Get Button Name;
OptimizeModelWindow << Create Instance(thisModuleInstance);
Wait(OptimizeModelWindow);
PList1 = appNS: ParamList1;
PList2 = appNS: ParamList2;
PList3 = appNS: ParamList3;
PList4 = appNS: ParamList4;
PList5 = appNS: ParamList5;
PList6 = appNS: ParamList6;
Print(PList1,PList2,PList3,PList4,PList5,PList6);
);
This is where the variables are read from the EditBoxes and update the default values...
doOptimizeParams = Function ( {},
HP1 = PEdit1 << Get Text;
appNS: ParamList1 = HP1;
HP2 = PEdit2 << Get Text;
appNS: ParamList2 = HP2;
HP3 = PEdit3 << Get Text;
appNS: ParamList3 = HP3;
HP4 = PEdit4 << Get Text;
appNS: ParamList4 = HP4;
HP5 = PEdit5 << Get Text;
appNS: ParamList5 = HP5;
HP6 = PEdit6 << Get Text;
appNS: ParamList6 = HP6;
);
CloseOptimizeButtonPress = Function( {this},
// This function is called when the Optimize button is pressed on the popup OptimizeModel window
name = this << Get Button Name;
doOptimizeParams();
Print(ParamList1,ParamList2,ParamList3,ParamList4,ParamList5,ParamList6);
(thisModuleInstance << GetBox) << Close Window;
);