GST 4.00 upgrade guide

Review when migrating to GST 4.00.

Important:

This is an incremental upgrade guide that covers only topics related to the Genero Studio version specified in the page title. Check prior upgrade guides if you migrate from an earlier version. Make sure to also read about the new features for this version.

Important:

This version of GST is desupported, use a more recent version of the product.

Corresponding new features page: GST 4.00 new features.

Genero Studio projects

If you are opening a Genero Studio project created in an earlier version of Genero Studio, you may encounter errors that did not exist in earlier versions. This is a result of new rules introduced; you must edit your project by hand to handle the issues that arise.

This list indicates things no longer allowed starting with Genero Studio 4.00.
  • You cannot have two nodes with the same output file. This can occur when you have two source files with the same name (but residing in different directories,) yet they have the same target directory; this results in error GS-12253. To fix this issue, you much change the target directories for those files in conflict.
  • Two sibling nodes of the same type cannot share the same name; this results in error GS-12525. To fix this issue, rename one of the sibling nodes.

Changes to the BAM API for OnSelectRows data code event

The dataEvent_<record>_OnSelectRows function signature has changed. It now has four parameters instead of one. The sqlQuery parameter is now split into separate SQL query clauses: sqlSelect, sqlFrom, sqlWhere, and sqlOrderBy.

Table 1. Example changes to function signature
New function Previous function
PUBLIC FUNCTION dataEvent_<record>_OnSelectRows(
    sqlSelect STRING, 
    sqlFrom STRING, 
    sqlWhere STRING, 
    sqlOrderBy STRING) 
    RETURNS(STRING)
PUBLIC FUNCTION dataEvent_<record>_OnSelectRows(
     sqlQuery STRING) 
     RETURNS(STRING)
 

The function may be called by the On Select Rows code event of a form, report data, or Web service entity to implement or alter an SQL query for a business record.

If you are migrating your application and you have previously used the function, you must edit your code and implement the new function instead. The new function has a code snippet that builds the SQL query from the various clauses for the return string. Read the dataEvent_record_OnSelectRows topic to better understand its use.

On Action Delete code event has been removed

The On Action Delete records data event is no longer available. The BAM now implements this functionality in the Before Delete Row and After Delete Row events.

Prior to 4.00, the On Action Delete Row event was incorrectly triggered after the row was deleted. If you are migrating a BAM-generated application and you have previously added custom code to the dlgEvent_record_OnActionDelete function, evaluate whether your existing code needs to be implemented in the dlgEvent_record_AfterDelete function.

If you are coding to overwrite a predefined delete action before deleting a row, read the dlgEvent_record_BeforeDelete topic to better understand its use.

Template dbapp5.0 environment sets

The Template dbapp5.0 Desktop and Template dbapp5.0 Mobile environment sets work only with full IMPORT FGL. If your existing project uses one of these environment sets, you must adapt the project:

  • Set the language to Genero (no link) on the root group node of your Applications and Libraries.
  • Add the _prg suffix to the name of the application node. For example, myTest becomes myTest_prg.
  • In the .xcf and MANIFEST files, when you mention the application name, ensure it includes the _prg suffix.
  • In generated GGC tests, add the _prg suffix to the application name:
    CALL ggc.setApplicationName("Application_prg")

    Alternatively, regenerate the GGC test.

  • In the Entities library, remove libgre.42x from the external dependencies.
  • For a Mobile Package, ensure the Main Module property is the application name (including the _prg suffix).

Business records

In Genero Studio 3.20 and earlier, the business record relationship was defined by the primaryFields and foreignFields properties. These properties have been replaced in GST 4.00 by the whereParameters property.

Preview Form

You can preview a compiled form, as described in Preview a form. While the method for accessing the form preview has not changed, how the form displays has.

Starting with 4.00, when you preview a form, you are shown either a realistic preview or a basic preview.
  • With the realistic preview, you can preview a form in its three states: display, input, or construct. Buttons along the top of the preview allow you to switch between the states. Sample data populates fields intended to display or modify data. This preview displays when the Genero installation (FGL) is 4.00 or greater, as configured by the Compiler / Runtime section of the Genero Configuration.
  • With the basic preview, the form displays without any sample data. There is no option to switch between states. This preview displays when the Genero installation (FGL) is 3.20 or previous, as configured by the Compiler / Runtime section of the Genero Configuration.

Code Editor and remote configuration

In Genero Studio 3.20 and earlier, Code Editor compiled the edited file locally even when using a remote configuration. Starting with 4.00, with a remote configuration, Code Editor compiles the edited file using the DVM of the remote server.

To use a local compilation process in remote configuration, select the Optimize for slow network checkbox in the General Preferences.

Hiding specific document error messages

You may notice new warning and informational messages display in the Document Errors tab. You can configure Genero Studio to hide these messages from the display. For more information, see Messages configuration.

Field dialog functions (BAM)

The syntax for field dialog functions (dlgEvent_record_BeforeField, dlgEvent_record_AfterField, and dlgEvent_record_OnChange) has changed in Genero Studio 4.00.02. These functions no longer use the currentField STRING parameter but instead include the fieldName in the function name.

For example, in Genero Studio 4.00.01 and earlier, the syntax for dlgEvent_record_BeforeField was:

PUBLIC FUNCTION dlgEvent_record_BeforeField( 
   dlg ui.DIALOG, 
   uiMode SMALLINT,
   dlgCtrlInstruction libdbappEvents.DlgCtrlInstruction_Type,
   currentField STRING )
  RETURNS (libdbappEvents.DlgCtrlInstruction_Type)

From Genero Studio 4.00.02, the syntax for dlgEvent_record_BeforeField is:

PUBLIC FUNCTION dlgEvent_record_BeforeField_fieldName( 
   dlg ui.DIALOG, 
   uiMode SMALLINT,
   dlgCtrlInstruction libdbappEvents.DlgCtrlInstruction_Type)
  RETURNS (libdbappEvents.DlgCtrlInstruction_Type)

You must update any code that uses dlgEvent_record_BeforeField, dlgEvent_record_AfterField, or dlgEvent_record_OnChange. For further information, see Fields dialog functions.

Filters return to Genero Studio Help

The ability to filter by manual was removed in the Help for Genero Studio 4.00.01 (EAP1). Filters have been reinstated in Genero Studio 4.00.02 (EAP2). See Genero Studio Help.

Template 2.3x desupported

Template 2.3x is desupported from Genero Studio 4.00 onward.

Changes in earlier versions

Make sure to check the upgrade notes of earlier versions, to not miss changes introduced in maintenance releases. For more details, see GST 3.20 upgrade guide.

Notable changes introduced in maintenance releases: