pulldown

Activate or load the specified menu bar.

pulldown/load  MenuBar

pulldown  {MenuBar}

Qualifiers

Qualifiers
Qualifier Description
/load Loads a menu bar into the application-level menu bar area.

Parameters

Parameters
Parameter Data Type Description
MenuBar String Name of a menu bar.

Return Values

Values returned in $status
Value Meaning
<0 An error occurred. $procerror contains the exact error.
0 option trigger of the selected menu item is empty
>0 Value returned by the option trigger of the selected menu item
Values commonly returned by $procerror following pulldown
Value Error constant Meaning
-1125 <UPROCERR_MENU> The specified menu does not exist.

Use

An error occurred. $procerror contains the exact error.

pulldown without the /load switch can only be used in character mode.

Description

A Uniface application possesses two default menu bar areas which are defined declaratively:

  • Application menu bar—declared in the Initial Menu Bar property.
  • Form menu bar—defined in the Menu Bar property.

Using the /load switch changes the menu bar loaded by the Initial Menu Bar declaration. The menu bar that is loaded depends on the current value of $variation

Caution: Avoid using the pulldown/load statement in the pullDown triggers; the effect of this can be very disconcerting.

Using pulldown in Character Mode

When using pulldown without the /load switch, note the following:

  • Use pulldown only when the TRIG parameter is present on the $MENU_BAR assignment setting. This indicates that Uniface should handle pullDown triggers and menu bars as it did prior to V5.2. For more information, see $MENU_BAR.
  • Use pulldown only in the application-level and form-level pullDown triggers.

The pulldown statement (without the /load switch) activates the current application-level menu bar; that is, it positions the cursor on the first option of the application menu bar and allows the user to select options using either the cursor keys or the mnemonic letter.

If the MenuBar argument is present, the menu specified is loaded and then activated. (This is equivalent to a pulldown/load MenuBar statement followed by a pulldown statement.) The menu bar that is loaded depends on the current value of $variation.

Changing the Form-Level Menu Bar

You cannot change the form-level menu bar using a pulldown or pulldown/load statement. If you need to use different form-level menu bars for a form in different situations, define the menu bar in several different libraries. Then set $variation to the appropriate library before the form is run.

Loading a Menu

The following example loads the menu P_USYS, but does not activate it, that is, the focus is not changed:

operation exec
  pulldown/load "P_USYS"
  edit NAME_FIELD
end; exec

Activating a Menu in Character Mode

The following example activates a menu:

trigger pulldown
   pulldown
end

This example only works if $MENU_BAR has been set to TRIG in the assignment file. It is better to do this declaratively, rather than use the pullDown triggers.

Related Topics