Standard front end functions

This table shows the built-in functions implemented by the front ends in the "standard" module. Additional modules and functions are available for front-ends, but are specific to the front-end type. Refer to the front-end documentation for more details.

The names of front-end functions and pre-defined parameters are case-sensitive.

Table 1. Standard built-in Front End Functions
Function Name Description GDC CLIENT HTML5 CLIENT
execute Executes a command on the workstation with or without waiting.
Parameters:
  • The command to be executed.
  • The wait option (1=wait, 0=do not wait).
Returns:
  • The execution result (TRUE=success, FALSE=error).
Yes No
feinfo

Returns front end properties like the front end type, the workstation operating system type.

Parameters:
  • The name of the property.
Returns:
  • The value of the property.

See Table 2 for property names and descriptions

Yes Yes
shellexec Opens a file on the workstation with the program associated to the file extension.
Parameters:
  • The document file to be opened.

Windows™ Only!: - the action to perform, related to the way the file type is registered in Windows Registry (Optional).

Returns:
  • The execution result (TRUE=success, FALSE=error)
Important: Under X11 Systems, this uses xdg-open, which needs to be installed and configured on your system. Kfmclient will be used as a workaround when xdg-open is not available.
Tip: In order to view a document (like a PDF for example), if that document can be displayed by web browsers, we recommend you to use the launchurl function instead. Especially if you want to use the both GDC and the GWC front-ends.
Yes No
launchurl Opens an url with the default url handler - typically your default browser (http urls), or your default mailer (mailto urls).
Parameters:
  • The url to be opened.
  • The mode (optional parameter, used by the Genero Web Client only). Set to "replace" if you want the current application in the browser window or tab to be replaced with the current URL, instead of launching a new browser window or tab. If it is not present or if a value other than "replace" is specified, the Genero Web Client behaves like the Genero Desktop Client, opening the URL in a new browser window.

Supported schemes depend on your system configuration.

Yes Yes
getenv Returns an environment variable set in the user session on the front end workstation.
Parameters:
  • The name of the environment variable.
Returns:
  • The value of the environment variable.
Yes No
getwindowid Returns the local window manager identifier of the window corresponding to the AUI window id passed as parameter.
Parameters:
  • The id of the Window node in the AUI tree.
Returns:
  • The local system window manage id of the window.
The node must be a WINDOW node, otherwise "0" is returned ; in traditional mode, WINDOWs widgets are simple frames ; the top level widget is the USERINTERFACE widget. In this case, use "0" as parameter to get the top level window id.
Yes No
opendir Displays a file dialog window to get a directory path on the local file system.
Parameters:
  • The default path.
  • The caption to be displayed.
Returns:
  • The name of the selected directory (or NULL if canceled).
Yes No
openfile Displays a file dialog window to get a path to open a file on the local file system.
Parameters:
  • The default path.
  • The name to be displayed for the file type.
  • The file types (as a blank separated list of extensions).
  • The caption to be displayed.
Returns:
  • The name of the selected file (or NULL if canceled).
Yes No
savefile Displays a file dialog window to get a path to save a file on the local file system.
Parameters:
  • The default path.
  • The name to be displayed for the file type.
  • The file types (as a blank separated list of extensions).
  • The caption to be displayed.
Returns:
  • The name of the selected file (or NULL if canceled).
Yes No
cbclear Clears the content of the clipboard.

Parameters: none.

Returns:
  • The execution result (TRUE=success, FALSE=error).
Yes No
cbset Set the content of the clipboard.
Parameters:
  • The text to be set.
Returns:
  • The execution result (TRUE=success, FALSE=error).
Yes No
cbget Gets the content of the clipboard.

Parameters: none.

Returns:
  • The text in the clipboard.
Yes No
cbadd Adds to the content of the clipboard.
Parameters:
  • The text to be added.
Returns:
  • The execution result (TRUE=success, FALSE=error).
Yes No
cbpaste Pastes the content of the clipboard to the current field.

Parameters: none.

Returns:
  • The execution result (TRUE=success, FALSE=error).
Yes No
mdclose Unloads a DLL or shared library module.
Parameters:
  • The name of the module.
Returns:
  • - 0 = success, -1 = module not found, -2 = cannot unload (busy).
Yes No
setreportfont Override the font used for report generation for the current application. You can simply copy/paste the font string from the "Report To Printer" font panel from GDC Monitor. An empty or null string reset to the default behavior.
Parameter:
  • A string that describe the font to use for report generation. For example: "Helvetica, Bold, Italic, 13". Alternatively, you can specify "<ASK_ONCE>" , "<ASK_ALWAYS>" , "<USER_DEFINED>" or "<USE_DEFAULT>" " which will perform the corresponding actions.
Returns:
  • The execution result (TRUE=success, FALSE=error).
Yes No
setreportprinter Override the printer configuration used for report generation for the current application. You can simply copy/paste the printer string from the "Report To Printer" printer panel from GDC Monitor. An empty or null string reset to the default behavior.
Parameter:
  • A string that describe the printer to use for report generation. for example: "moliere, Portrait, A4, 96 dpi, 1 copy, Ascendent, Color, Auto. Alternatively you can specify "<ASK_ONCE>" , "<ASK_ALWAYS>" , "<USER_DEFINED>" or "<USE_DEFAULT>" " which will perform the corresponding actions.
Returns:
  • The execution result (TRUE=success, FALSE=error).
Yes No
setwebcomponentpath Defines the base path where Web Components are located, when GDC is directly connected to the runtime system. This is ignored when GDC is connected to the GAS.
Parameter:
  • The base url (e.g. "http://myserver/components" or "file:///c:/components")
Returns:
  • The execution result (TRUE=success, FALSE=error).
Yes No
hardcopy

It allows you to print a screenshot of the current window.

Parameters:
  • none, or the optional parameter "1" to indicate if the screenshot must be adapted to the page size.
Returns:
  • The execution result (TRUE=success, FALSE=error).
Yes No
Table 2. feInfo properties.

feinfo property values

Property name Description
fename The name of the front end.
fepath The installation directory of the front-end executable.
ostype The operating system type (Windows , OSX, HPUX, AIX®, SOLARIS, LINUX).
osversion The version of the operating system.
numscreens Number of screens available.
screenresolution Returns the screen resolution (with optional screen number parameter).
ip Returns the ip address of the interface used for the connection.
datadirectory Returns the directory name that can be used for temporary file transfer. This directory is cleaned at front-end startup and end, and is common to all front-end instances.
isActiveX Returns the 1 if front-end runs in active x mode (GDC specific).
target Returns platform target code name (for instance: "w32vc80" for Win32).
outputmap Returns the GWC application output map of the current application. This option is only supported with a GAS >= 2.22.00.