Previous Topic: Event Handling in the Action Diagram

Next Topic: Modifying the Property Sheet

Calling the Wizard

When end users click the Create Project button, you want to call the Project Wizard function so that they can define a new Project record and the Task records that go with that Project.

To do this, add an Event construct specifying what should happen when the Create New Project event is triggered.

To add action diagram code for the Create New Project event:

  1. Choose Edit Scoping Function F11 from the View menu to switch to the action diagram for the Project Manager function.
  2. In the Select Edit Point dialog, select the Events Post Point, and click OK:

    Calling the Wizard

  3. In the Action Diagram Palette (not the Variable Palette), expand the Events folder.

    Note that the three logical events you created are listed in the Events folder:

    PLEX--Calling the Wizard (2)

    picture

  4. Drag the Create New Project event to the input line of the Action Diagrammer, and press Enter.

    This adds an Event construct:

    PLEX--Calling the Wizard (4)

  5. Set the Object Browser to display functions.
  6. Drag the Project Wizard function to the input line of the Action Diagrammer, and press Enter.

    A function call statement is added to the action diagram:

    PLEX--Calling the Wizard (5)

    This tells the function to display the wizard when the Create New Project button is pressed.

    At this point, you will only map the one event. Before you can map the other two events to call the property sheet, you must make a small change to the property sheet function.

  7. Save your model and keep the action diagram open for later.