Top
PowerCOBOL V11.0 User's Guide
FUJITSU Software

5.1.3 PowerCOBOL Editor Window

In the PowerCOBOL Editor window, you write COBOL statements and 'drag and drop' related controls and/or forms to create the events associated with the selected control or form. You can also select properties and methods to be applied to the control or form. A property refers to the modifiable attributes of a control or form (for example, the font size). A method refers to the possible actions that a control or form can perform (for example, moving the control to a new position on the form).

If the event you select has not previously had code written for it, you will be presented with the following editor window:

Figure 5.2 The PowerCOBOL Editor window with Debug buttons.

For a complete list of COBOL statements that can be applied to controls and forms as well as a listing of available properties and methods, refer to the "PowerCOBOL Reference".

The PowerCOBOL Editor window contains the following elements:

Title Bar

The title bar displays the name of the control and the name of the event.

Guide Display Area

The guide, displayed across the top of the window below the title bar, acts as a ruler to show the width of columns and the current column position of the cursor. To display or hide the guide, select or de-select Display Column Guide in the Options menu.

Line Number Display Area

Line numbers keep track of how many lines are included in a procedure, and what is on each line. The current line number containing the cursor is also highlighted. Line numbers can also be displayed or hidden by selecting or de-selecting Display Line Number in the Options menu.

NOTE

You can also select whether or not to display the Tab and Carriage Return characters and/or wide blanks, adjust the tab width, indent new lines and be prompted to save the open event procedure in the Options menu.

Find box and Find buttons

Specify a string to find in the Find box, and then click the appropriate Find button to find forward or backward.

NOTE

You cannot specify the "Match whole word only" and "Match case" options in this case. Select the "Find" option in the "Edit" menu if you want to use the options.

Object box and Event box

Select a control or form name in the Object box and an event in the Event box to open and edit the event procedure.

Split bar

You can split the editor window into two panes by using the Split bar as follows:

Figure 5.3 The PowerCOBOL Editor in split screen mode.

Move to the top, move to the bottom or double click the Split bar to release the split.

Debug Buttons

When you debug your PowerCOBOL programs, you observe your code using the PowerCOBOL Editor. The Debug buttons are enabled. They cover such functions as stepping into or over the code, executing the code to the next breakpoint, breaking into execution, and watching data items.

Comment Line setting

If you select the "Set Comment Line" option of the "Edit" menu, PowerCOBOL inputs an asterisk ('*') into the indicator area (column 7) of the selected lines. If you didn't select any lines, PowerCOBOL inputs an asterisk indicator area into the line that has a caret (the line the cursor is positioned on).

If you select the "Release Comment Line" option, PowerCOBOL inputs a space into the indicator area.

Go to a Line

You can go to a specified line by using the "Go To" dialog box as follows:

Figure 5.4 The "Go To" dialog box.

The PowerCOBOL Editor provides these options and is customizable as well.

Note

Most of the editor screen shots in this manual have the editor toolbar turned off, so your editor may appear differently.

5.1.3.1 Creating and Accessing Event Procedure Code from the Project Manager

You may create new code and access existing event procedure code from the PowerCOBOL Project Manager window, without opening a form for editing.

You can do this in the left windowpane by simply right clicking the mouse on the control whose event procedure code you wish to create or modify.

This brings up a pop-up menu from which you can select Edit Event Procedure. You are then presented with a secondary pop-up menu listing the available events as shown in the following figure:

Figure 5.5 Selecting an event procedure from the Project Manager window

NOTE: An asterisk (*) beside an event means that there is already a custom event procedure associated with it.

When you select one of these events, the PowerCOBOL Editor window will appear containing the code for that particular event.

If you examine the left windowpane of an application that already contains some custom event procedure code for one or more controls, you will note a node in the hierarchical tree diagram named [COBOL Script] (see Figure 5.5).

This node will list under it all existing custom event procedures [scriptlets]. You may right-click the mouse on any one of these scriptlets and select Open from the pop-up menu to open it in the Editor for modification.