You can use the Source editor to edit the source of most PowerScript objects directly instead of making changes to an object in a painter. You cannot edit the source of project or proxy objects. The Source editor makes it unnecessary to export an object in order to edit it and then import it, as you do with the File editor.
For more information on the PocketBuilder File editor, see “Using the File editor”.
Caution—back up your objects Although the Source editor provides a quick way to make global changes, you should use it with caution, and you must be familiar with the syntax and semantics of PowerScript source code before changing it in the Source editor.
Changes you make to an object's source code using the Source editor take effect immediately when you save the object, before the code is validated. If an error message displays in the Output window, you must fix the problem in the Source editor before you close the editor. If you do not, you will not be able to open the object in a painter.
Technical Support is not able to provide support if changes you make in the Source editor render an object unusable. For this reason, Sybase strongly recommends that you make backup copies of your PKLs or objects before you edit objects in the Source editor.
You can open an object in the Source editor in one of several ways:
Use the Open dialog box
Select the Edit Source menu item in the System Tree or Library painter
Select the Edit Source menu item in the Output window for a line that contains an error
Unlike the File editor, the Source editor cannot be opened independently. It can be used only in conjunction with an object defined within a PowerScript target in the current workspace. You cannot open an object in the Source editor that is already open in a painter.
In exported objects that you view with the File editor, a PBExportHeader line is always generated for the object. If you saved the object with a comment from the object’s painter, a PBExportComment line is also viewable in the exported file. The Source editor display is identical to the display in the File editor except that the PBExport lines that are visible at the beginning of the code in the File editor are not visible in the Source editor.
For more information on exporting objects, see “Exporting and importing entries”.