Good day JMP community, I just installed JMP15 and I am finding some errors, hoping somebody can help me to fix this.
I developed an application in JMP 14 to make interactive analysis easier, however I am finding errors when trying to use same application with JMP15.
Here brief explanation of application, I press a button in the app and appears screen to interactively encode data (Baseline), then as user encodes the condition to be used as baseline, ANOVA is created.
Here the script I am using (this scripts runs in the application when the corresponding button is pressed):
nw = New Window( "SCRIPT REQUIREMENTS",
<H List Box(
V List Box(
Text Box ("Provide Baseline"),
Text Box( "" ),
Lineup Box( 2, Text Box( "BASELINE" ), conditionlist_box = Text Edit Box( "", set width(80) ) ),
),
V List Box( Text Box( "" ), Button Box( "OK"),
Button Box( "Cancel" , nw << Close Window) )
)
);
CND1 = conditionlist_box << get text;
If( nw == {Button( -1 )}, Stop() );
show (CND1);
Oneway( Y( :FINALTHICKNESS ), X( :CONDITION ),
All Pairs( 1, Ordered Differences Report( 1 ) ),
With Control( 1, {char( CND1, "\!N")} ), );
Let's say I encoded "A" (as baseline), then JMP 14 executes the ANOVA, I can see this is in the LOG of JMP14:
CND1 = "A";
Oneway[]
However if I try to use JMP 15, this is the error I get (it seems CND1 is not picked or recognized):
deleted object reference: conditionlist_box << get text in access or evaluation of 'Glue' , nw = New Window( "SCRIPT REQUIREMENTS",
<H List Box(
V List Box(
Text Box( "Provide Baseline" ),
Text Box( "" ),
Lineup Box(
2,
Text Box( "BASELINE" ),
conditionlist_box = Text Edit Box( "", set width( 80 ) )
)
),
V List Box(
Text Box( "" ),
Button Box( "OK" ),
Button Box( "Cancel", nw << Close Window )
)
)
); /*###*/CND1 = conditionlist_box << get text; /*###*/
If( nw == {Button( -1 )},
Stop()
); /*###*/Show( CND1 ); /*###*/Oneway(
Y( :FINALTHICKNESS ),
X( :CONDITION ),
All Pairs( 1, Ordered Differences Report( 1 ) ),
With Control( 1, {Char( CND1, "
" )} )
) /*###*/;
In the following script, error marked by /*###*/
nw = New Window( "SCRIPT REQUIREMENTS",
<H List Box(
V List Box(
Text Box( "Provide Baseline" ),
Text Box( "" ),
Lineup Box(
2,
Text Box( "BASELINE" ),
conditionlist_box = Text Edit Box( "", set width( 80 ) )
)
),
V List Box(
Text Box( "" ),
Button Box( "OK" ),
Button Box( "Cancel", nw << Close Window )
)
)
); /*###*/CND1 = conditionlist_box << get text; /*###*/
If( nw == {Button( -1 )},
Stop()
); /*###*/Show( CND1 ); /*###*/Oneway(
Y( :FINALTHICKNESS ),
X( :CONDITION ),
All Pairs( 1, Ordered Differences Report( 1 ) ),
With Control( 1, {Char( CND1, "
" )} )
) /*###*/;
Changing the setting of "conditionlist_box" to be populated when the Text Edit Box is changed, fixes the issue
nw = New Window( "SCRIPT REQUIREMENTS",
<<MODAL></MODAL>
@txnelson already provided a solution.
May be more general remarks for future projects:
- please use the JSL formatting option in the post, makes it much more readable
- In Scripteditor you can also let JMP format your script (Edit menu, or Crtl-M), I find it very useful
- JMP changes from time to time how Objects are handled, your object "Texteditbox" has gone, when the window is closed, so no data can be retrieved anymore, @txnelson provided a solution to overcome
- Other solutions can be found in scripting index (hope so also in future), searching for modal window
- following script is from scripting index and slightly modified, you can play with it to understand how values are returned with option "Return Result"; I find this a good and easy way for more complex windows.
Names Default To Here( 1 );
window_reference = New Window( "Dialog() example",
// try comment out next line
<<MODAL></MODAL>
Thank you @txnelson for the support, it fixed my problem.
Also thanks @Georg, after your suggestion I used the CTRL-M in my scripts, you are right it is very helpful and more readable.