ui.Interface.frontCall()

 

ui.Interface.frontCall() allows calling non-4gl applications on the client side.

 

Syntax:

 

ui.Interface.frontCall("module", "function", [arguments], [result])

 

Arguments:

 

module

specifies a string value identifying the name of the shared library in which the function to be executed is specified

function

specifies a string value identifying the name of the function to be called

arguments

specifies the list of the necessary input parameters

result

specifies the list of the output parameters

 

Usage and examples:

 

ui.Interface.frontCall() allows executing procedures such as managing clipboard content or opening files by means of front-end software.

 

Input and output arguments for this class method are entered as a list within square brackets:

 

CALL ui.Interface.frontCall("module", "function", [arg1, arg2, arg3, ...], [result])

 

Input parameters can be represented by expressions, but output parameters must be variables only, so that they could get the returned values. The specification of output parameters is optional, as the operating system will ignore values returned by the front-end. Empty parameter lists must be identified by empty square brackets:

 

CALL ui.Interface.frontCall("standard", "cbadd", [], res_variable)

 

Usually, front-call arguments involve variables. However, some front calls need a file path as arguments. Specified file paths must follow the syntax of the front-end file system. You may need to escape backslash characters in such parameters:

 

MAIN

CALL fgl_getkey()

CALL ui.Interface.frontCall("standard", "opendir", ["C:\\Program Files\\Querix\\Lycia 3 Development Suite 7.1\\Lycia\\images\\", "Choose the directory"], [])

END MAIN

 

or

 

MAIN

DEFINE start_path, caption, destination STRING

CALL fgl_getkey()

LET start_path = "C:\\Program Files\\Querix\\Lycia 3 Development Suite 7.1\\Lycia\\images\\"

LET caption = "Choose the directory"

CALL ui.Interface.frontCall("standard", "opendir", [start_path, caption], [destination] )

DISPLAY "destination = ", destination

END MAIN

 

ui.Interface.frontCall() standard module includes the default built-in front-end functions. The list of the standard front-end functions is provided here. Additional modules and functions are available for front ends, including .dll and .so libraries. 4gl developers can also create their own modules so as to customize front-end calls.

 

ui.Interface.frontCall() arguments (both input and output parameters) are controlled by the front end. If any issues occur with their specification, certain errors can arise.

 

 

Related articles:

Standard front end functions