JavaScript Validation is a new JavaScript preference page. This preference enables the
ECMAScript editor to validate code as you type. The editor displays errors and to-do's in the
Problems and the Tasks views.
You can use JavaScript Validation to control automatic script validation. By default, the preference
is turned on. You might not want to use this feature all of the time, especially
when you need to type a large script. As the following figure illustrates, you can turn it off anytime.
If Automatically validate scripts is turned off, you can manually
validate scripts by using the Script Validation Tool. This tool's icon is to the left of the
Help button in the ECMAScript editor.
In addition, metadirectory classes, which are available during runtime, are now accessible from
the script editor. To construct such an object, code completion is now available
as well as to access static methods. For more details, see the following figure.
In addition to accessing metadirectory classes from the ECMAScript editor, you can access them in the
Expression Builder. Because ECMAScript is type free, not all methods can be provided via code completion.
Therefore, to facilitate and make very long packages and methods with arguments easily
accessible, you can use Expression Builder to drill down to the methods.
Constructors and methods have been separated. When you select a constructor or method, Designer fills it
with "dummy" parameters, which reflect their type. For instance, int param says aInt, and an
array of bytes says aByte [].
Note: Array syntax is purely for you to realize that an array needs be passed in.
Also, tooltips provide more explanation on the parameters. When you select a method, the resultant expression
starts with a '.' followed by the method's name and parameters. This resultant expression is not complete. You
must prepend it with the proper object name.