Compile the script
Now you compile the script you just typed. In this exercise, you
use a pop-up menu item to compile the script. PowerBuilder also compiles
a script when you close the Script view or when you select a different
object, event, or function for display in the Script view.
Handling errors in scripts
When there is an error in a script, an error window displays at
the bottom of the Script view with the line number of the error and
the error message.
To find an error
Click on an error message to move the cursor to the line that
contains that error. After you correct the error, you can try to compile
the script again.
Commenting out errors
PowerBuilder does not save scripts that have errors. If you want
to save a script that has errors, select the entire script and click the
Comment button to comment out the code. You can come back later,
uncomment the code, and fix the problem.
-
Right-click anywhere in the Script view script area.
Select Compile from the pop-up menu.
The script compiles. You do not leave the Script view or the
Window painter workspace. -
Select File>Save from the menu bar.
Select File>Close from the menu bar.
The Window painter closes.