Customize with POINTs and BLOCKs

You may add your own code to the generated code files in special sections of the generated code called POINT and BLOCK sections.

The code in POINTs and BLOCKs is preserved in the application even when the application is rebuilt. During the first application generation, POINT and BLOCK sections will only contain the Name attribute. As you customize the application, you may change the code in the POINT or BLOCK. When the code is changed, the area will include a Status attribute set to MODIFIED.

.code Files

Code added to a generated 4gl file's POINT and BLOCK sections is preserved in a .code file that is used each time the application is compiled.
  • To remove all the changes that you've made, you can simply remove the .code and all generated 4gl files.
  • If you are using Source Code Management, the .code file must be committed with the project. It is not necessary to commit the generated 4gl files.

POINT

There are POINT sections within each BLOCK. You will find the smaller, more granular POINT sections after all control blocks (BEFORE ROW, AFTER INPUT, ....) and at all relevant locations for adding business logic. Typical use of a POINT is to: You are responsible for the validity of the code in a POINT.

BLOCK

Each function in the generated code is nested within a BLOCK section. This means that you can change the behavior of the generated function, however once new code has been added to a BLOCK, you take responsibility for the validity of all the code in that BLOCK.