This page contains questions frequently asked when migrating applications from BDL V3 to Genero BDL.
FAQ001: When using Genero, why do I have a different display than with BDL V3?
FAQ002: Why does an empty window always appear?
FAQ003: Why do some COMMAND KEY buttons no longer appear?
FAQ004: Why aren't the elements of my forms aligned properly?
FAQ005: Why doesn't the ESC key validate my input?
FAQ006: Why doesn't the CTRL-C key cancel my input?
FAQ007: Why do the gui.* FGLPROFILE entries have no effect?
FAQ008: Why do get invalid characters in my forms?
FAQ009: Why do large static arrays raise a stack overflow error?
FAQ010: Why do get error -6366 "Could not load database driver drivername"?
Genero introduces major Graphical User Interface enhancements that sometimes require code modification. With BDL V3, application windows created with the OPEN WINDOW instruction were displayed as static boxes in the main graphical window. In the new GUI mode of Genero, application windows are displayed as independent, resizable graphical windows.
Links: Dynamic User Interface, Windows, Application class.
An additional empty window appears when I explicitly create a window with OPEN WINDOW (following the new window management rules).
01
MAIN02
OPEN WINDOW w1 AT 1,1 WITH FORM "form1"03
MENU "Example"04
COMMAND "Exit"05
EXIT MENU06
END MENU07
CLOSE WINDOW w108
END MAIN
In the new standard GUI mode, all Windows are displayed as real front-end windows, including the default SCREEN Window. When an application starts, the runtime system creates this default SCREEN Window, as in version 3. This is required because some applications use the SCREEN Window to display forms (they do not use the OPEN WINDOW instruction to create new windows). So, to facilitate BDS V3 to Genero migration, the runtime system must keep the default SCREEN window creation; otherwise, existing applications would fail if their code was not modified.
You can either execute a CLOSE WINDOW SCREEN at the beginning of the program, to close the default window created by the runtime system, or use the OPEN FORM + DISPLAY FORM instructions, to display the main form in the default SCREEN window.
01
MAIN03
OPEN FORM f FORM "form1"03
DISPLAY FORM f04
MENU "Example"05
COMMAND "Exit"06
EXIT MENU07
END MENU08
END MAIN
When creating a MENU with COMMAND KEY(keyname) "option" clause, the button for keyname is no longer displayed:
01
MAIN02
MENU "Example"03
COMMAND "First"04
EXIT PROGRAM05
COMMAND KEY (F5) "Second"06
EXIT PROGRAM07
COMMAND KEY (F6) -- Third is a hidden option08
EXIT PROGRAM09
END MENU10
END MAIN
In BDL Version 3, when using the MENU instruction, several buttons are displayed for each clause of the type COMMAND KEY(keyname) "option": one for the menu option, and others for each associated key.
When using Genero, for a named MENU option defined with COMMAND KEY, the buttons of associated keys are no longer displayed (F5 in our example), because there is already a button created for the named menu option. The so called "hidden menu options" created by a COMMAND KEY(keyname) clause (F6 in our example) are not displayed as long as you do not associate a label, for example with the FGL_SETKEYLABEL() function.
In my forms, I used to align labels and fields by character, for typical
terminal display. But now, when using the new LAYOUT
section, some elements are not aligned as expected. In the following
example, the beginning of the field f001
is expected in the column
near the end of the digit-based text of the first line, but the field is
actually displayed just after the label "Name:
":
01
DATABASE FORMONLY02
03
LAYOUT04
GRID {05
0123456789012345678906
Name: [f001 ]07
}08
END09
END10
11
ATTRIBUTES12
f001 = formonly.field1 TYPE CHAR;13
END
By default, Genero BDL displays form elements with proportional fonts, using layout managers to align these elements inside the window. In some cases, this requires a review of the content of form screens when using the new layout management, because the layout is based on new alignment rules which are more abstract and automatic than the character-based grids in Version 3.
In most cases, the form compiler is able to analyze the layout section of form specification files in order to produce an acceptable presentation, but sometimes you will have to touch the form files to give hints for the alignment of elements.
In the above example, the field f001
is aligned according to the
label appearing on the same line. By adding one space before the field position,
the form compiler will understand that the field must be aligned to the text in
the first line:
01
DATABASE FORMONLY02
03
LAYOUT04
GRID {05
0123456789012345678906
Name: [f001 ]07
}08
END09
END10
11
ATTRIBUTES12
f001 = formonly.field1 TYPE CHAR;13
END
In the next example, the fields are automatically aligned to the text in the first line:
01
DATABASE FORMONLY02
03
LAYOUT04
GRID {05
First Last06
Name: [f001 ] [f002 ]07
}08
END09
END10
11
ATTRIBUTES12
f001 = formonly.field1 TYPE CHAR;13
f002 = formonly.field2 TYPE CHAR;14
END
The traditional 4GL ESC key does not validate an INPUT, but cancels it instead!
To follow front end platform standards (like Microsoft Windows for example), Genero must reserve the ESC key as the standard key to cancel the current interactive statement.
You can change the accelerator keys for the 'accept' action with Action Defaults. However, is not recommended to change the defaults, because ESC is the standard key to be used to cancel a dialog in GUI applications.
The traditional 4GL CTRL-C key does not cancel an INPUT.
To follow front end platform standards (like Microsoft Windows for example), Genero BDL must reserve the CTRL-C key as the standard key to copy the current selected text to the clipboard, for cut and paste.
You can change the accelerator keys for the 'cancel' action with Action Defaults. However, is not recommended to change the defaults, because ESC is the standard key to be used to cancel a dialog in GUI applications.
The gui.*
and some other FGLPROFILE
entries related to graphics no longer have effect.
These entries are related to the old user interface. They are no longer supported. In
BDS version 3, the gui.*
entries
were interpreted
by the front end. As the user interface has completely been re-designed in
Genero, some gui.*
entries
have been removed.
See migration notes for more details.
The application starts, connects to the database and seams to work properly, but strange symbols (rectangles, question marks) are displayed in the forms for non-ASCII characters. The ASCII characters display properly.
The is certainly a character set configuration mistake.
You have probably defined a wrong - or missed the - runtime system locale or the database client locale. Read carefully the section "Understanding locale settings" in the Localization page.
When using very large static arrays (DEFINE a1 ARRAY[10000] OF ...), I get a stack overflow on Windows platforms.
The runtime system uses the default stack size defined by the C compiler. As function static arrays are allocated on the C stack, using very large static arrays in functions can result in a stack overflow error.
Review the program and use dynamic arrays instead of static arrays..
Error -6366 occurs when the runtime system fails to load the specified database driver.
The database driver shared object (.so or . DLL) or a dependent library could not be found.
Make sure that the specified driver name does not have a spelling mistake. If the driver name is correct, there is probably an environment problem. Make sure that the database client software is installed on the system (Genero does not communicate directly with the database server, you need the client library). Check the UNIX LD_LIBRARY_PATH environment variable or the PATH variable on Windows. These must point to the database client libraries. Another common error is the installation of a database client software of a different object type as the Genero runtime system. For example, if you install a 32 bit Genero version, you must install a 32 bit version of the database client software, the 64 bit version will not work.