What's new in Genero Business Development Language, v 1.30

This topic lists features added for the 1.30 release of the Genero Business Development Language.

Table 1. What's new in Genero Business Development Language, Version 1.30
Overview Reference
First version of integrated preprocessor using # sharp syntax for macros. Version 1.32 uses & instead See The preprocessor
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
Localization Support (multi-byte character sets). See Localization
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
Support for PostgreSQL 7.4 with parameterized queries. See SQL adaptation guide For PostgreSQL 8.x.y, 9.x.y

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 Module build information
A MySQL 3.23 driver is now provided for Windows™ platforms (was previously only provided on Linux™). See SQL adaptation guide For Oracle MySQL 5.x
COMBOBOX fields now support UPSHIFT and DOWNSHIFT attributes, to force character case when QUERYEDITABLE is used. See QUERYEDITABLE attribute
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 file name for the compiled output file, adding the .iem extension. See Compiling message files
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 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 Methods of native arrays
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

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
The new method ui.Dialog.SetCellAttributes() lets you define colors for each cell of a table. See Setting cell color attributes
The ui.Window class provides new methods to create or get a form object. See ui.Window methods

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 simple lines
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 Defining the total number of rows in a list
The new form field attribute TITLE can be used to specify a table column label with a localized string. See TITLE attribute
The FGLLDPATH variable is now used during program linking. See Compiling source files
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 Action defaults
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 Windows closed by the user
INPUT ARRAY using TABLE container now needs FIELD ORDER FORM attribute to keep tabbing order consistent with visual order of columns. See Handling 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
The linker option -O (optimize) is de-supported (was ignored before). You now get a warning if you use this option. See Linking programs
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 dash '-' in the layout tag.

See Widget size within 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. See SPACING attribute
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

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"
See
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 durint 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

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
New methods are provided in ui.Interface to control the MDI children. See Window containers
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