[TOC] [Prev] [Next] [Bottom]



Chapter Fourteen

Grouping Actions


Organizing Related Actions

The Group action allows you to organize actions within the file by grouping related actions and naming the group.

The topics in this chapter cover:

  • working with action groups
  • executing grouped actions.
[top] [back to top]


About Grouped Actions

In large Tango application files, it is common to place a number of related actions together; however, when viewing an application file, it can be difficult to locate the related actions. To allow you to better organize actions within the file, you can group related actions and name the group. They also provide a destination for branching.

For more information, see "Application File Window"..

You can view grouped actions in a collapsed or expanded state by clicking the disclosure triangle. Groups added to an application file are in the expanded state by default. The collapsed or expanded state of an action group is saved in the application file. When the file is next opened, the last state is restored.

You can also include an action group within another action group.

You cannot associate action attributes with an action group. When you select a group, Results HTML, No Results HTML, Error HTML, and Push attributes are disabled.

[top] [back to top]


Working With Action Groups

Adding an Action Group

To add an action group to an application file
  • From the Actions palette, drag the Group icon to the location you want in the application file.

Follow the instructions in "Adding an Action to a Group" on this page to add actions.

To automatically group selected actions
  • Select the actions you want to group together, and choose Group from the Edit menu or the contextual menu.

A new action group containing all selected actions is created and positioned where the top-most selected action was.

For more information, see "Naming an Action"..

Once added, the action group appears with a default name, just like other actions. You rename action groups in the same way you rename other actions. Just like action names, the action group name must be unique within the application file.

Adding an Action to a Group

To add an action to a group

Do one of the following:

  • Drag an action between two actions that are already in the group.

    The action is added to the group at that location.

  • Use the Copy and Paste commands from the Edit menu or contextual menu to copy and paste an action into a group.

! Note: You can select discontiguous actions in the application file and drag, or copy and paste them into a group; the actions do not need to be together already.


Removing an Action From a Group

To remove an action from a group

Do one of the following:

  • Drag the action you want to remove outside the group.

    If you drag the action above or below the group, the action appears immediately before or after the group, respectively.

  • Use the Copy and Paste commands from the Edit menu or contextual menu to copy and paste an action outside of a group.

! Note: Removing actions from a group does not delete the group, even if all actions are removed from the group.


Ungrouping Actions

To ungroup all actions with a group
  1. Select the Group action.
  2. Do one of the following:
    • From the Edit menu, choose Ungroup.
    • Control+click the Group action and choose Ungroup from the contextual menu that appears.

This deletes the group action but keeps the actions that were within the group.

You can also drag actions out of the action group, but that does not delete the Group action itself.

Deleting an Action Group

You delete an action group and all actions within it the same way you delete any action. Deleting a group also deletes all the actions within it.

For more information, see "Deleting an Action".

Effect on Actions of Editing an Action Group

  • Moving an action group automatically moves all actions within the group with it.
  • Copying an action group copies all actions within the group as well.
  • Deleting an action group deletes the action group and all actions within the group.

Branching to an Action Group

You can specify an action group as the destination of a Branch action.

For more information, see "Jumping to a Designated Action (Branch Action)".

[top] [back to top]


Executing Grouped Actions

When Tango Server encounters an action group during file execution, no operation is performed on the action group itself, only on the actions within the group.

For more information, see "Exiting a Loop (Break Action)".

Even though an action group has no effect on the execution of an application file, Tango Server supports the ability to branch to an action group and the ability to break out of an action group. If a Break action is encountered within a group, the next statement to be executed is the first statement outside of the group.



[TOC] [Prev] [Next] [Bottom]



docs@pervasive.com

Copyright © 1999, Pervasive Software. All rights reserved.