14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

378 Display Trees Chapter 11<br />

Modal Windows<br />

Figure 11.22 Default Dialog Arrangements for Windows (left) and Macintosh (right)<br />

{variable = 42, var2 = 86, Button(1)}<br />

Note that JMP does exert some control over OK and Cancel button positions to ensure that dialog boxes are<br />

consistent with what the operating system (Windows or Macintosh) expects. In certain cases, JMP needs to<br />

override your HList, VList, and LineUp settings for Button(OK) and Button(Cancel). Do not be<br />

alarmed if the result is slightly different from what you expect.<br />

Assign Dialogs to Variables<br />

Note: This section pertains only to the deprecated Dialog() function and the Column Dialog()<br />

function. A variable for a New Window() function contains a reference to the window itself.<br />

If you assign the Dialog() function to a variable, JMP stores the list returned by the Dialog() function in<br />

that variable. Calling that variable calls the list, not the Dialog().<br />

myValues=Dialog(HList(<br />

VList(<br />

"Lower Spec Limit", lsl=EditNumber(230)),<br />

VList(<br />

Button("OK"),<br />

Button("Cancel"))));<br />

myValues; // returns the list of values<br />

If you want to store the Dialog() function itself for later use, quote it with Expr.<br />

myDialog=expr(Dialog(HList(<br />

VList(<br />

"Lower Spec Limit", lsl=EditNumber(230)),<br />

VList(<br />

Button("OK"),<br />

Button("Cancel")))));<br />

myDialog; // draws the dialog box to gather values<br />

Unload Results from Column Dialogs<br />

Note: This section pertains only to the deprecated Dialog() function and the Column Dialog()<br />

function.<br />

Column Dialog() returns a list, and values are not set directly.<br />

result=dialog(<br />

v list(

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

Saved successfully!

Ooh no, something went wrong!