cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Ole
Ole
Level III

JSL Scripts not running in JMP 15

My scripts do not run when I try them in JMP 15. They work fine in JMP14 (and have in JMP13 too).

The error message I get in the log (see example below) is familiar to me. I know it since JMP12 and it only happend before when I ran a script and had the log open. The solution was to just close the log.

In JMP 15 the log is open by default and I can't close it. The preference "Log Open Strategy( "Explicit" )," doesn't exist in JMP15.

Is there a way to close the log and/or get around the 'Glue' error message otherwise?

 

Example (XXX = replacement for actual name of data tables's):

deleted object reference: cbf << Get Selected in access or evaluation of 'Glue' , Try(TQC_daily << close window);   /*###*/Try(Close(dt_xxx, no save));  /*###*/Try(Close(dt_xxx, no save));  /*###*/Try(Close(dt_xxx, no save));  /*###*/Try(Close(dt_xxx, no save));  /*###*/Try(Close(dt_xxx, no save));  /*###*/Try(Close(dt_xxx, no save));  /*###*/Try(Close(dt_xxx, no save));  /*###*/Try(Close(dt_xxx, no save));  /*###*/Try(Close(dt_xxx, no save));  /*###*/Try(Close(dt_xxx, no save));  /*###*/Names Default To Here(1);

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: JSL Scripts not running in JMP 15

Modal windows, which pause the execution of the script until the dialog is dismissed, are one example where it is common to try to use a box after it has been deleted.  In this example, it would be preferred to initialize a variable prior to the prompt dialog:

 

dbSelected = "Proda";

 

And then save the results of the radio box during the execution of the dialog:

 

			cbf = Radio Box( {"Proda", "Prodb", "Prodc", "Product_Stats"},
				dbSelected = cbf << Get Selected;
			)

 

When you have multiple inputs and prefer to group the input processing together, you can use the <<On Validate() or <<On Close() scripts as part of the New Window() call:

 

New Window( "OCS Scripts",
	<<Modal,
	<<On Validate(dbSelected = cbf << Get Selected; 1),

I hope one of these approaches helps!

 

View solution in original post

4 REPLIES 4

Re: JSL Scripts not running in JMP 15

For the deleted object reference on <<Get Selected(), I assume that cbf is some kind of display box.  In versions of JMP prior to JMP 15, it was possible in some cases to access display boxes for some time after a window had closed.  How long they were available was difficult to say - if you called Wait() from JSL the boxes would finally be deleted, and many other calls could have deleted the box.  Furthermore, the behavior was different between Mac and Windows - typically the boxes would be deleted sooner on Mac than on Windows.  The recommendation is to complete all use of display boxes prior to closing the window.

 

I don't know how this is related to your calls to close data tables.  Do you have OnClose scripts that run when a data table or report are deleted?

Ole
Ole
Level III

Re: JSL Scripts not running in JMP 15

Hi and thanks for getting in touch with me.

 

I don't have OnClose scripts running. What I do have though are selection windows where the user can (or has to) select e.g. to only look at a specific product.

I just tried it and scripts that don't have the selection window seem to run fine. The selection box looks for example like below.

 

 
New Window( "OCS Scripts",
	<<Modal,
	H List Box(
		V List Box(
			Text Box(
				"Select product you want to create trend data",
				<<Set Wrap( 300 ),
				<<Set font size( 12 ),
				<<font color( "dark green" ),

			),
			Text Box( "", <<Set Wrap( 300 ), <<Set font size( 10 ), <<font color( "dark red" ), ),

		),

	),
	hb = H List Box(
		pbFab = Panel Box( "Select your decision:",
			cbf = Radio Box( {"Proda", "Prodb", "Prodc", "Product_Stats"} ),

		),

	), //end Hlist
               
	Text Box( "", <<Set Wrap( 800 ), <<Set font size( 10 ), <<font color( "dark green" ) ),
	Text Box( "", <<Set Wrap( 800 ), <<Set font size( 12 ), <<font color( "dark green" ) ), 
      
	V List Box( H List Box( Button Box( "OK", proceed = 1 ), Button Box( "Cancel", proceed = 0 ) ), ),

);
If( proceed == 0,
	Caption( {300, 300}, "Script aborted", spoken( 0 ), Delayed( 0 ) );
	Wait( 2 );
	Caption( remove );
	Throw();
);
dbSelected = cbf << Get Selected;
Show( dbSelected );
 

Re: JSL Scripts not running in JMP 15

Modal windows, which pause the execution of the script until the dialog is dismissed, are one example where it is common to try to use a box after it has been deleted.  In this example, it would be preferred to initialize a variable prior to the prompt dialog:

 

dbSelected = "Proda";

 

And then save the results of the radio box during the execution of the dialog:

 

			cbf = Radio Box( {"Proda", "Prodb", "Prodc", "Product_Stats"},
				dbSelected = cbf << Get Selected;
			)

 

When you have multiple inputs and prefer to group the input processing together, you can use the <<On Validate() or <<On Close() scripts as part of the New Window() call:

 

New Window( "OCS Scripts",
	<<Modal,
	<<On Validate(dbSelected = cbf << Get Selected; 1),

I hope one of these approaches helps!

 

Ole
Ole
Level III

Re: JSL Scripts not running in JMP 15

Hi, Both options work. Although I don't seem to need to set "dbSelected = "Proda";" before the modal window.

 

Thank you very much. Rewriting scripts now...