BDL 1.30 new features

Features added in 1.30 releases of the Genero Business Development Language.

Important:

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

Important:

This page covers only those new features introduced with the Genero BDL version specified in the page title. Check prior new features pages if you migrate from an earlier version. Make sure to also read the upgrade guide corresponding to this Genero version.

Corresponding upgrade guide: BDL 1.30 upgrade guide.

Prior new features guide: BDL 1.20 new features.

Table 1. Core language
Overview Reference
First version of integrated preprocessor using # hash syntax for macros. Version 1.32 uses & instead See Source preprocessor.
Localization support (multibyte character sets). See Localization.

The fglcomp compiler now adds build information in 42m modules. Compiler version of a 42m module can be checked on site by using the fglrun with the -b option (line break added for documentation only):

$ fglrun -b module.42m
2004-05-17 10:42:05 1.30.2a-620.10
 /devel/tests/module.4gl 
See 42m module information.
The fglmkmsg tool now has the same behavior as other tools like fglcomp and fglform: If you give only the source file, the message compiler uses the same filename for the compiled output file, adding the .iem extension. See Compiling message files (.msg).
New BREAKPOINT instruction to stop a program at a given position when using the debugger. It is ignored when not running in debug mode. See Setting a breakpoint programmatically.
New assignment operator := has been added to the language. Assign variables directly within expressions: IF (i:=(j+1))==2 THEN See Assignment (:=).
New fglcomp compiler option to detect non-standard SQL syntax: fglcomp -W stdsql module.4gl See SQL portability.

New method base.StringBuffer.replace(), to replace a sub-string in a string:

CALL s.replace("old","new",2)
Replaces two occurrences of "old" with "new"...
See base.StringBuffer.replace.
New methods to read/write complete lines in base.Channel built-in class: readLine() and writeLine(). See Read and write text lines.
The FGLLDPATH variable is now used during program linking. See Compiling source files.
The linker option -O (optimize) is de-supported (was ignored before). You now get a warning if you use this option. See Linking programs.

The [] array sub-script operator now returns the sub-array:

DEFINE a2 DYNAMIC ARRAY
 WITH DIMENSION 2 OF INTEGER
LET a2[5,10] = 123
DISPLAY a2.getLength() -- displays 5
DISPLAY a2[5].getLength() -- displays 10
See Arrays.
Table 2. User interface
Overview Reference
New layout rules and form item attributes provide better control of form design. See Form rendering.
Decoration attribute can be defined in a presentation style file to set fonts and colors. See Presentation styles.
Action defaults can be specified in forms in the ACTION DEFAULTS section. See ACTION DEFAULTS section.
New ui.Dialog built-in class to provide better control over interactive instructions. See The Dialog class.
COMBOBOX fields now support UPSHIFT and DOWNSHIFT attributes, to force character case when QUERYEDITABLE is used. See QUERYEDITABLE attribute.
New presentation style attribute highlightCurrentRow for Tables, to indicate if the current row must be highlighted in a specific mode. By default, the current row is highlighted during a DISPLAY ARRAY. See Table style attributes.
New method appendElement() for ARRAYs, to append an element at the end of a dynamic array. See Array methods.
New assignment operator := has been added to the language. Assign variables directly within expressions: IF (i:=(j+1))==2 THEN See Assignment (:=).
The new method ui.Dialog.setCellAttributes() allows you to define colors for each cell of a table. See Cell color attributes.
The ui.Window class provides new methods to create or get a form object. See ui.Window methods.
When using a dynamic array in INPUT ARRAY or DISPLAY ARRAY, the number of rows is defined by the size of the dynamic array. The SET_COUNT() or COUNT attributes are ignored. See Controlling the number of rows.
The new form field attribute TITLE can be used to specify a table column label with a localized string. See TITLE attribute.
New class method ui.Dialog.setDefaultUnbuffered() to set the default for the UNBUFFERED mode. See The buffered and unbuffered modes.
Action defaults are now applied at element creation by the runtime system. In previous versions this was done dynamically by the front-end. Now, changing an action default node at runtime has no effect on existing elements. See Configuring actions.
The DATEEDIT field type now supports DBDATE/CENTURY settings and the FORMAT attribute. See FORMAT attribute.

New default action 'close' to control window closing:

  ON ACTION close
See Implementing the close action.
INPUT ARRAY using TABLE container now needs FIELD ORDER FORM attribute to keep tabbing order consistent with visual order of columns. See Defining the tabbing order.

New instructions ACCEPT INPUT / ACCEPT CONSTRUCT / ACCEPT DISPLAY to validate a dialog by program.

ON ACTION doit
   ACCEPT INPUT
See ACCEPT INPUT instruction, ACCEPT DISPLAY instruction, ACCEPT CONSTRUCT instruction.
New dialog attribute ACCEPT / CANCEL to avoid creation of default actions 'accept' and 'cancel'. See INPUT instruction configuration.
New default action 'append' in INPUT ARRAY. Allows you to add a row at the end of the list. See Default actions in INPUT ARRAY.
New method ui.Window.createForm() to create an empty form object in order to build forms from scratch at runtime. See ui.Window.createForm.
TOPMENU definition in forms now allows attributes in parenthesis. See TOPMENU section.

The form layout syntax now allows you to specify the real width of form items by using a hyphen '-' in the layout tag.

See Widget width inside hbox tags.
Important remark: Before build 530 the MENU has attached the window when returning from the BEFORE MENU actions. Since build 530 the WINDOW must exist before the MENU statement. So now the Menu AUI tree node is available in the BEFORE MENU block, but a window opened or made current in the BEFORE MENU block will NOT be used.
Layout GRID now accepts HBox tags to group items horizontally. See Hbox tags.
Form VERSION attribute to distinguish form revisions. See VERSION attribute.
Form layout SPACING attribute to define space between widgets. Desupported in V4. See Universal Rendering as standard.
Form DEFAULT SAMPLE instruction to define a default sample attribute for all form fields. See INSTRUCTIONS section.
New form item attributes: SAMPLE, JUSTIFY, SIZEPOLICY ... See SAMPLE attribute, JUSTIFY attribute, SIZEPOLICY attribute
To hide form elements by default, that can be shown by the end user by option, use HIDDEN=USER as 'hidden to the user by default'. See HIDDEN attribute.
Individual table columns now have new attribute UNMOVABLE to avoid moving. See UNMOVABLE attribute.
WANTCOLUMNSANCHORED replaced by UNMOVABLECOLUMN and WANTCOLUMNSVISIBLE replaced by UNHIDABLECOLUMNS. See UNMOVABLECOLUMNS attribute, UNHIDABLECOLUMNS attribute.
Tables now accept a WIDTH and HEIGHT attribute to specify a size. See WIDTH attribute, HEIGHT attribute.
New RADIOGROUP attribute to define the orientation of the radio buttons: ORIENTATION. See ORIENTATION attribute.
The MENU COMMAND clause now generates action names in lowercase. This means, when you define COMMAND "Open", it will bind to all actions views defined with the name 'open'. See COMMAND [KEY()] "option" block.
New ui.Interface.loadTopMenu() method to load a global TOPMENU. See ui.Interface.loadTopMenu.
The ON CHANGE block is now invoked when the user clicks on a CHECKBOX, RADIOGROUP, or changes the item in a COMBOBOX. See ON CHANGE block.
New DIALOG keyword to reference the current dialog as a ui.Dialog object. This can be used for example to enable/disable fields during the dialog execution. See The Dialog class.

The ui.Form built-in class has new methods to handle form elements. The hidden attribute is now also managed at the model level, this allows you to hide form fields by name, instead of using the decoration node.

CALL myform.setElementHidden("formonly.field1",2)
CALL myform.setFieldHidden("field1",2)
 -- prefix is optional
See The Form class.
New methods are provided in ui.Interface to control the MDI children. Desupported in V4. See Universal Rendering as standard.
In INPUT ARRAY, CANCEL INSERT now supported in AFTER INSERT, to remove the new added line when needed. See CANCEL INSERT instruction.

TOOLBAR and TOPMENU elements now have the hidden attribute so you can create them and hide the options the user is not supposed to see.

Important:

Hiding a toolbar or topmenu option does not prevent the use of the accelerator of the action. Use ui.Dialog.setActionActive() to disable an action.

See ui.Form.setElementHidden.
New option NEXT FIELD CURRENT to gives control back to the dialog instruction without moving to another field. See Giving the focus to a form element.
Table 3. SQL databases
Overview Reference
Support for PostgreSQL 7.4 with parameterized queries. See PostgreSQL.
A MySQL 3.23 driver is now provided for Windows™ platforms (was previously only provided on Linux®). See Oracle MySQL / MariaDB.

The fglcomp compiler now converts static SQL updates like:

UPDATE tab SET (c1,c2)=(v1,c2) ...

to a standard syntax:

UPDATE tab SET c1=v1, c2=v2 ...
See UPDATE.

On Windows platforms only, the ix drivers automatically set standard Informix® environment variables with ifx_putenv(). Values are taken from the console environment with getenv(). Additional variables can be specified with:

dbi.stdifx.environment.count = n
dbi.stdifx.environment.xx = "variable"
No more available in recent versions.