Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter SeventeenApplication Integration Functions (continued)

MenuReplacePopup Function

Overview

The MenuReplacePopup function replaces or substitutes the items for an application popup menu.

Syntax/Parameters

Syntax

int = MenuReplacePopup ( string name );

int = MenuReplacePopup ( string name, string list[] );

Parameters

name

A string specifying the name of the menu to replace or delete. Only the name is provided, the named entry is deleted from the substitution table.

list[]

A string array containing function codes to present on the menu.

Return Value

Returns an int as ERROR_NONE or a formatted error code on failure.

Remarks

The MenuReplacePopup function either adds, replaces or deletes a named entry in the application’s menu substitution table. The substitution table is used when loading certain menus within the application as published in the Application Menu Guide. Since menus are created ‘on the fly’, except for size, the name of the menu being replaced is not tested as being a valid or existing name. Only published menus can be replaced.

If the list parameter is not provided, the menu name is located and the substitution entry deleted. If the name already exists in the substitution table, it is replaced.

Certain application support functions calling for a menu may automatically append, delete or otherwise alter the provided menu.

The list can contain function codes or any of three control terms:

‘separator’

Adding this string results in a separator line being added to the menu.

‘popup code’

Adding this string creates a popup group and adds a named position to the current menu node. The provided function code menu text becomes the text of the popup. All following items are added to the popup sub menu until the ‘endpopup’ is found. An endpopup is not required if the list of menu function codes simply ends. The name is required. The specified function code is not executed, only referenced for the text.

‘endpopup’

Using this string ends a popup section and moves up the tree to the parent menu.

Many of the returned error codes will contain the offending list index in the low word of the return value.

See Appendix B, Application Menu Guide for the published list of popup menu names.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic