14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - 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.

520 Creating and Sharing Applications Chapter 15<br />

Application Builder<br />

Figure 15.9 New Script and Script Properties<br />

2. Edit the object’s placeholder script and properties to provide the necessary functionality. For example,<br />

the radio box shown in Figure 15.9 reflects the following changes:<br />

– The Title property was changed to Submit, the text that appears on the button.<br />

– The Close Window function was added to the object. When the user clicks the Submit button, the<br />

window closes.<br />

Tip: After you add a script to an object and then delete the object, delete the object’s script from the Scripts<br />

tab if you no longer need the script. This feature prevents scripts that you might want in the future from<br />

being deleted.<br />

If you rename the script in the object properties, rename it on the Scripts tab also. And if the script is used<br />

in another part of the application, rename it there as well.<br />

Write an Anonymous Script<br />

An anonymous script is available only to the object that defines it. For example, you might want a simple<br />

Print statement for one button that is not used elsewhere. By writing an anonymous script, you reduce the<br />

number of names to manage in the script. Anonymous scripts also reduce clutter among more important<br />

named scripts in the Scripts tab, because you add them to the object properties.<br />

The following examples show two types of anonymous scripts:<br />

Print(Button1

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

Saved successfully!

Ooh no, something went wrong!