Migrating from IBM Informix 4gl to Genero BDL / User interface topics |
Typical IBM® Informix® 4GL programs use the TUI mode and often exploit all the display possibilities of the language for dumb terminals. Some instructions are specific to TUI mode and should be reviewed when redesigning the application for GUI mode.
For example, data records can be displayed in a screen array with a DISPLAYarray[array-index].* TO screen-array[screen-line] instruction, optionally with the ATTRIBUTE clause to use some TTY attributes like colors, reverse and bold effects. When scrolling a list, I4GL actually uses the terminal scrolling capabilities to preserve the TTY attributes in each row. This applies only to the current rows visible on the screen, but it was a commonly used feature.
In order to display application screens on different types of front-ends, Genero Business Development Language (BDL) handles user interface elements in a more abstract way. Therefore, dumb terminal specifics as described above cannot be supported. A good replacement for DISPLAY ... TO ... ATTRIBUTE() in DISPLAY ARRAY or INPUT ARRAY is to use the DIALOG.setArrayAttributes() method.
Genero BDL supports TUI-specific instructions such as DISPLAT AT, CLEAR SCREEN, CLEAR WINDOW, as well as TTY attributes such as BLUE, RED, REVERSE, but you should use those instructions for TUI programs only. New GUI programs should use graphical user interface possibilities. For example, a good replacement for TTY attributes is to use presentation styles.