ui.Interface.loadStartMenu()

ui.Interface.LoadStartMenu() method is used to load a start menu. This method is an alternative to an application launcher menu creation.

While the application launcher menu functions create the menu within the 4GL source, the ui.Interface.LoadStartMenu() method, in its turn, loads a file storing the start menu options. Though such an approach offers less flexibility, it allows the source code reduction.

The syntax of its invocation is as follows:

 

CALL ui.Interface.LoadStartMenu (file_name)

 

where:

ยท         file_name = a STRING variable standing for the file name containing the start menu to be loaded definition and the path which is optional (the file should be located on an application server)

 

Usage

Here is an example of the ui.Interface.loadStartMenu() method calling:

 

#loads the start menu defined in my_startmenu_file

CALL ui.Interface.LoadStartMenu("my_startmenu_file")

 

It is advisable not to specify the file extension. It is automatically added by the runtime system when the file is determined: initially the system searches for the file with the name specified with the .sm2 extension, if it does not exist the .fm2 file is being searched for. In case the file with the name specified does not exist, the corresponding runtime error occurs.

 

However, it is still possible to specify the file containing the start menu definition as "my_startmenu_file.fm2". If there is no such a file, an error will occur at runtime.

 

Third-party files containing the top menu definition are converted into the .sm2 format.