1.
Select File > New > Application (or File > New > New Application on Macintosh).
3.
Select File > Save and save the file as a JMP Source File. The extension is .jmpappsource.
2.
Drag the object onto the Module1 tab (or double-click the object).
6.
From the Application Builder red triangle menu, select Run Application to test your application.
1.
Select Format > Add Module.
Change the Variable Name in the module’s object properties.
Select Format > Delete Module.
ret = Module1 << Create Instance() will not return until the dialog is complete. By this time, the dialog has been destroyed. Therefore, the return value will not be a handle to the Module Instance. Like New Window(), the return will instead be of the form {Button(1 | -1), User Data}. (1 | -1) indicates whether the OK (1) or Cancel (-1) button was pressed.
User Data() is a new property on the Module Instance. During execution of the dialog, the Module script can set the user data:
	thisModuleInstance << Set User Data(...);
Like New Window(), if there is no OK or Cancel button included, an OK button will be added.
There is an optional Validate script property on the Module Instance. This script is only used for Modal dialogs and behaves like On Validate() in New Window(). It is called when the OK button is pressed, and returns 1 to accept the input or 0 to disallow the close.
Tip: If you use the Validate property, you can call thisModuleInstance << Set User Data().
Unlike other module types, a Modal Dialog will not show until the module script has completed. For other module types, the window is created during the call to thisModuleInstance << Create Objects. JMP cannot display a Modal Dialog here because control would stop and there would be no way to initialize the contents of the boxes in the display. Since the window is not created yet, you will not be able to do actions like set the window title or set an on-close script.
The top and left edges of an object align (or snap) to the nearest dotted grid lines as you drag them on the workspace. For a more precise placement, deselect Snap to Grid in the Application Builder red triangle menu. You can also turn off Snap to Grid for all applications in the JMP Preferences. Select File (Windows) or JMP (Macintosh)> Preferences > Platforms > JMP App to change the option.
Figure 15.5 shows the various methods for dragging objects inside a container.
Figure 15.5 Examples of Dragging Objects into a Container
To position a container object precisely, select the object and then change the X Position and Y Position properties. After you enter a new X position, press the TAB key to see the object move to the new position and then enter the new Y position.
To place an object in the upper left corner, right-click the object and select Move to Corner. This is a shortcut to setting the X and Y positions to 0. On Macintosh, hold down CTRL and COMMAND and then select Move to Corner.
Tips: 
The Align Boxes options are unavailable when you select a container rather than the internal objects.
Figure 15.6 Change a Panel to an Outline
Figure 15.7 Container Toolbar
On Windows, select Edit > Clear to delete all objects in a module.
To create the radio box list items in Figure 15.8, double-click the placeholder items “Item1” and “Item2” and enter the new list item.
Figure 15.8 Radio Box Object Properties
For more information about an object, right-click the object and select Scripting Help. The JMP Scripting Index appears, and the object that you selected is highlighted. The Scripting Index often includes a script that you can run to see an example of the object.
Prevents users from editing the application in a text editor. Only applications that the user runs are encrypted (the .jmpapp file and the application in a JMP add-in). Scripts that you save to a data table, journal, and add-in are encrypted. For more information about encryption, see Encrypt and Decrypt Scripts in Programming Methods.
Figure 15.9 Label in Data Table Prompt Window
To see the scripts in these namespaces, click the Scripts tab and then select the namespace in the Namespace list (or in the Objects pane). See Figure 15.10.
Figure 15.10 Application and Module Namespaces
A named script is a function that several controls can use. The this argument tells which control is calling the function. In the following example, Get Button Name is sent to the this argument to print the button name to the log when the button is clicked:
Button1Press = Function({this}, Print(this <<Get Button Name))
On another button, use Button1Press script to produce the same results.
1.
Right-click the object, select Scripts, and then select the script that you want to add. In this example of creating a button, select the Press script. (On Macintosh, press OPTION, and then select Scripts > Press.)
The object’s placeholder script appears on the Scripts tab (Figure 15.11). The name of the named script, Button1Press, shows up in both the script and the object properties.
Figure 15.11 New Script and Script Properties
2.
Tip: After you add a script to an object and then delete the object, delete the object’s script from the Scripts tab if you no longer need the script. This feature prevents scripts that you might want in the future from being deleted.
If you rename the script in the object properties, rename it on the Scripts tab also. And if the script is used in another part of the application, rename it there as well.
An anonymous script is available only to the object that defines it. For example, you might want a simple Print statement for one button that is not used elsewhere. By writing an anonymous script, you reduce the number of names to manage in the script. Anonymous scripts also reduce clutter among more important named scripts in the Scripts tab, because you add them to the object properties.
Print(Button1 <<GetButtonName) // simple anonymous
Function({this}, Print(this <<GetButtonName)) // parameterized anonymous
Objects such as check boxes might provide additional arguments after this that are not otherwise available. One example is an argument that tells which check box in a column of check boxes just changed.
When an object has multiple scripts, right-click the object, select Scripts, and then select the script name. You can also select the Scripts tab, select the module name from the Namespace list and then select the script name from the Method list. Likewise, to see the application scripts, select Application from the Namespace list.
In each case, the Scripts tab appears with the cursor in the first line of the object’s script.
Right-click the platform object on the workspace and select Edit Platform Script. After you edit the script and click OK, the object on the workspace is updated.

Help created on 10/11/2018