Common Desktop Environment: Application Builder User's Guide

To Connect a Menu Item to an Execute Code Action

Only the Execute Code target action is described in this section. See "To Connect a Menu Item to a Predefined Action" and "To Connect a Menu Item to a Call Function" for information about those connections.

  1. Display the Connections Editor.

    Click Connections at the bottom of the Revolving Property Editor or choose Connections from the Editors menu of the App Builder primary window.

  2. Choose Menu Item from the Source menu.

    All of the menu items in the current project will be listed.

  3. Select a menu item from the list below the Source menu.

    This is the item from which the connection will be made.

  4. Choose a When action for the Source menu item.

    Choices are Activated, Created, and Destroyed.

  5. Choose Execute Code as the target action type from the Action Type menu.

    The Execute Code Editor will be displayed.

  6. Type the code to be executed in the Execute Code Editor.

    The Execute Code Editor will be displayed. Type the code in the editor. See "Adding User Code to Generated Code" for information about incorporating user code into the generated code.

  7. Click OK in the Execute Code Editor to apply the changes and dismiss the editor.

  8. Click Connect in the Connections Editor to make the connection.

    The connection will be displayed in the View list at the bottom of the Connections Editor.

  9. Click Cancel to dismiss the Connections Editor.

The code will be executed in the compiled application when the When action is performed on the menu item.