Using the Source editor – PB Docs 2017

Using the Source editor

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.

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 using the
Source editor to change it.

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,
Appeon strongly recommends that you make backup copies of your PBLs 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 only be used in conjunction with an object defined
within a target in the current workspace. You cannot open an object in
the Source editor that is already open in a painter.

When you export an object and view the exported file in the file
editor, a PBExportHeader line displays at the beginning of the file. If
you saved the object with a comment from the object’s painter, a
PBExportComment also displays. The Source editor display is identical to
the display in the file editor except that the PBExport lines are not
present in the Source editor.

For more information on exporting objects, see Exporting and importing
entries
.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x