cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
VanGiang
Level I

JMP Script Dispatch Function

Dispatch.PNGHi all, I have a question about Dispatch Function in JMP script that what is number 400 in the script, what does it mean ? I found 400 number appear alot in the script in our forum so I don't understand about it and something like Item ID, Legend Model, Properties...I didn't see that in any document of JMP. Could ypu help me to solve it ?

6 REPLIES 6

Re: JMP Script Dispatch Function

The Send to Report and Dispatch arguments in your example are intended to for JMP to be able to save a script that will reproduce the current platform as completely as possible. They are not intended for us to write scripts. A lot of people use them and that is their choice, but that is not the intention. The information about them is missing from the documentation (i.e., they are undocumented) because we should use other ways of directly communicating with the objects in the report layer. For example, send the << Add Ref Line(---) message to the axis box.

VanGiang
Level I

Re: JMP Script Dispatch Function

Ok, got it. Thank you so much. I took a lot of time for it :))
hogi
Level XII

Re: JMP Script Dispatch Function

What is the reason that on one hand the auto-generated scripts rely on undocumented functions and on the other hand neither users are adviced to use them nor does one find a documentation?

Sounds like "This is how you could do it - but please don't do it like this"

 

Is there some whitepaper or talk available that explains which functions should not be used and how the auto-generated scripts can be converted to code with documented functions?


Another idea:

Could the auto-generated scripts automatically use documented functions only?

Re: JMP Script Dispatch Function

That's right. The way JMP saves a script to capture the customizations is NOT the best practice for coders like you and me. It is a scheme developed by JMP developers for their purpose, not ours.

 

We should use messages to display boxes to accomplish the customizations in our scripts. The messages can be sent after the window opens or 'in-line' when the function is called to create the display box

 

New Window( "Me",
	Outline Box( "Still Me",
		neb = Number Edit Box( 1 )
	)
);
neb << Set Minimum( 0 ) << Set Maximum( 10 );

New Window( "Me, too",
	Outline Box( "Still Me, too",
		neb = Number Edit Box( 1,
			<< Set Minimum(  0 ),
			<< Set Maximum( 10 )
		)
	)
);

.

Re: JMP Script Dispatch Function

Is the subject and conclusion talked here still valid? I have been using JMP generated code for creating my own scripts on many occasions. This is mostly because I read the book "Jump Into JMP® Scripting" which specifically instructs users to take advantage of JMP generated code. Furthermore, Send To Report and Dispatch arguments can both be found from the Scripting index.

Re: JMP Script Dispatch Function

Yes, we recommend using JMP to save scripts after achieving the desired result through the interactive interface. It is a great way to jump-start your own code or learn the JMP Scripting Language. It can help you quickly achieve some level of automation when using JMP. On the other hand, this approach only goes so far. It is a best practice, not a complete solution.

Note: I don't know which part of the book you refer to, but that recommendation generally applies to the analysis layer layer of a platform object. These commands mimic what is available while performing the analysis, such as the commands found in the context menu that appear when you click a red triangle. Customizations work with the report layer of the object and require communication with the display boxes in this layer. (Think: obj = dt << Bivariate( ... ); // reference to analysis layer, rpt = obj << Report // reference to report layer;)

Yes, Send to Report and Dispatch are still intended for JMP to save scripts and capture as much of the object's state as possible so that JMP can create a new instance later. Customization of the user interface through coding is supposed to rely on using the protocol for each display box and a set of supporting functions. This approach is documented and promoted in the JMP Scripting Guide and the Scripting Index.

You may either use the Send to Report mechanism or send messages directly to display box objects. It seems to be a personal choice as to how much of each approach suits any user.

Regardless of your chosen approach, please continue to use the Community when you have questions about scripting JMP.