Create an IncludeScript

An IncludeScript may define a fragment of code or a complete ProcScript module. It is only compiled when the object that uses it is compiled. To create an IncludeScript, add it to an IncludeScript Library.

You must have created a project to contain your application definitions. For more information, see Working with Projects.
  1. Open your project. In the U-Bar, click Browse, select prj, then choose the project you want to open.
  2. If you have not already done so, create an IncludeScript Library:
    1. In the Templates tab of the Resource Browser, select the IncludeScript library template.
    2. Drag and drop it onto the project in the Structure Editor.
    3. Rename the library.
    4. Optionally, edit the Description property to provide a more informative description.
  3. Double-click the IncludeScript Library (libinc) to open it, or right-click it and choose Open from the menu.
  4. Drag and drop an IncludeScript template from the Resource Browser onto the Library object in the Structure pane.

    Uniface provides a default template called Empty include in the INCLUDE_TEMPLATES palette.

  5. Rename the IncludeScript object and edit the Description property to provide more information about the IncludeScript.
  6. Go to the Write Script worksheet, select the IncludeScript object, and edit its contents.

    For more information, see Scripting Application Behavior .

To use the IncludeScript in your code, use the #include instruction to insert the script at the desired location.

Related Topics