GST 3.20 upgrade guide

Review when migrating to Genero Studio 3.20.

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.

Corresponding new features page: GST 3.20 new features.

Customizations to overloaded GRE library files may require updates

Some library functions internal to the Genero Report Engine (GRE) have been removed or renamed by prefixing the previous name with "fgl_report_". If such functions have been referenced in your overloaded $GREDIR/src/overloadables/*.4gl files, when you upgrade to 3.20 you will need to alter your overloading 4GL files to match.

To be precise, if you have previously created your own version of the CompatCustom.4gl library file by copying the default version provided at installation and continued using any of the renamed functions, you must edit your copy and rename these functions to use the new names.

For example, the function:
  • toSax(out,n) must be changed to fgl_report_toSax(out,n).
  • compatibleWith704() must be changed to fgl_report_compatibleWith704().

Code Editor preferences for colors and fonts have changed

Several changes have occurred with the introduction of themes. Colors and fonts are now set on the theme level, and you can no longer override the font family and size for a language as a whole.

If you have customized the colors and fonts preferences, read the Themes preferences topic to better understand any changes you need to implement.

The padding of objects uses the background color of the object

In previous versions of the report designer, the padding of an object used the background color of the parent object. In 3.20, the padding of an object uses the background color of the object itself.

If required, you can revert to previous behavior. Use the fgl_report_setRenderingHints function to set the pxmlColorizePadding rendering hint:
DEFINE renderingHints om.SaxAttributes
LET renderingHints=om.SaxAttributes.create()
CALL renderingHints.addAttribute("pxmlColorizePadding","false")
CALL fgl_report_setRenderingHints(renderingHints)

GUI Testing and existing tests

The GUI testing has been updated to use the most recent version of the Genero Ghost Client (GGC 2.x). For existing tests generated with GGC 1.x, do the following:
  1. The '-I "$(GGCDIR)/lib"' compiler option has been removed from the default 4gl Genero compiler build rule. Add '-I "$(GGCDIR)/lib"' to the Compiler Option on the application node of your project that contains your test. This property can be inherited; you can add the option to the parent Group node if it applies to multiple child nodes.
  2. Add a command line argument specifying the working directory to the Command line arguments property of the test application node. For example, if your working directory was the /bin subdirectory of the project, you would update the Command line arguments property to state '--workingDir ../bin '.
For those old GGC 1.x tests, if you read through the generated test file, you will notice an include statement specifying the file that contains the definition of the macros:
&include "GGCTestUtilsMacro.4gl"
The macros are written in uppercase. In this snippet from the generated test file, two macros can be found:
...
WAIT_FOR_APPLICATION("app_1484", 1025)
ASSERT_EQUALS(getWindowName(), "w_orderform")
...
You can quickly view the definition for either macro by:
  1. Placing your cursor in the macro keyword (WAIT_FOR_APPLICATION or ASSERT_EQUALS in our example.)
  2. Hold down the CTRL key.
  3. Press the ENTER key (or click the mouse).

The GGCTestUtilsMacro.4gl file opens in Code Editor, with the selected macro highlighted.