14.03.2014 Views

Using JMP - SAS

Using JMP - SAS

Using JMP - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

350 Personalize <strong>JMP</strong> Chapter 11<br />

Personalize Toolbars and Menus on Windows<br />

5. (Optional) To specify the translation for the caption or tip, do the following:<br />

– Click the Localize button for the item that you want to customize.<br />

– Select the language.<br />

– Enter the translation next to Text.<br />

– Click OK.<br />

6. Customize the untitled button or menu item as described in the following procedure.<br />

Step 3: Assign Functionality<br />

Clicking a menu item or button either executes a predefined command or runs a JSL script. The script can<br />

be stored in a separate file, or you can enter the JSL in the Run this JSL area of the Menu Editor. If users<br />

have access to a central location, such as a network, you typically want to run the script from that location.<br />

This also simplifies giving users access to updated scripts. Otherwise, store the JSL in the menu item or<br />

button definition.<br />

To associate a menu item or button with an add-in JSL script, you have two options:<br />

• Select Run JSL in this file, and then browse to find the external file.<br />

• Type the relative path to the JSL script, and select the add-in from the Use add-in home folder list. For<br />

example, the following command runs the mds_application.jsl script from the selected add-in:<br />

$ADDIN_HOME(com.jmp.mdswithr)\mds_application.jsl<br />

In addition, you can select Use the “Here” namespace for unqualified JSL variable names if you<br />

include namespaces in the internal or external JSL script. See the Scripting Guide book for details about<br />

namespaces.<br />

To assign this functionality, follow these steps:<br />

1. With the Menu Editor still opened, select the menu item or button that you want to modify.<br />

The Action properties appear on the right.<br />

2. Select the action that you want to execute.<br />

3. To run an internal JSL script, delete the placeholder text print(“Not implemented.”); in the Run this JSL<br />

area and enter the JSL.<br />

4. (Optional) If your internal or external JSL script includes namespaces, click Use the “Here”<br />

namespace for unqualified JSL variable names.<br />

5. Click Save to save your changes.<br />

Step 4: Show an Icon on the Menu Item or Button (Optional)<br />

New menu items have no icon next to the item. New buttons show up as blue squares on the toolbars. You<br />

can assign a descriptive icon to the menu item or button. The graphic can reside on your computer or in an<br />

add-in folder. .ico, .png, .jpg, and .bmp graphics are supported.<br />

Assigning an icon to a button is particularly important. Otherwise, the user must view the button’s tooltip<br />

to see what the button does.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!