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



Chapter Ten

Building Actions Using Tango Builders


How Tango Builders Work in Application Files

Tango builders help you create and generate a sequence of actions to perform specific tasks. Builders are added to an application file in exactly the same way you add any other action.

Once you add a builder and configure it, the actions the builder generates are inserted automatically into the application file. Builder information is saved in the application file format, making it cross-platform capable. This means you can use any application file containing a builder across all platforms.

Tango Editor provides two builders.

  • The Search Builder builds the actions required to perform a search of database records and to update and delete them.

    For details about how to configure the Search Builder, see "About the Search Builder".

The topics covered in this chapter include:

  • adding a builder to an application file
  • generating builder actions
  • details about the actions generated by the builders.
[top] [back to top]


Adding a Builder to an Application File

With a new or existing application file open, you add a builder in the same way you add an action; that is, you drag the builder icon from the Actions palette into the application file window.

When you drag either of the builder icons into an application file window, the corresponding builder window opens. For example, if you drag the Search Builder icon from the Actions palette into an open application file, the Search Builder window opens so you can immediately set Search Builder options.

Adding a builder to an application file

In the application file window, the corresponding builder icon appears with a default name, just like with actions. The default name for the Search Builder is "SearchBuilder" and for the New Record Builder, "NewRecordBuilder".


! Note: Tango Editor can properly process one Search Builder and one New Record Builder in the same application file. If you want to use multiple builders of the same type in a single file, you must handle them using If actions and additional request arguments.


For more information, see "Conditional Action Execution (If Action)".

If you add a builder to an application file that already contains the same builder using the default name, Tango adds a number to the default name and increments it by one for each subsequent addition, for example, "SearchBuilder1", "SearchBuilder2", and so on.


! Note: The title of the builder window is in the same form as an action window, <File name> : <Builder name>.


Within the application file, a builder behaves exactly like an action group. That is, it contains actions that can appear in expanded or collapsed form. In the preceding diagram, the Search Builder icon represents a group, but the group is empty until its actions are built. Tango Server ignores unbuilt builders.

Page Format Table Settings

Tango Editor by default saves your Tango Builder page formats and uses these settings for new tables you create in the builders, allowing you to develop a consistent appearance for Web sites and Tango applications quickly.

Unique page formats set in the New Record Builder and in each of the Search, Record List, and Record Detail tabs in the Search Builder are saved and used as defaults for new tables.

To change whether page format are saved
  1. From the Edit menu, choose Preferences.

    The Preferences dialog box appears.

  2. Click the General tab.
  3. Under Editor options, check or uncheck Make last builder page format settings the default for new builders.
[top] [back to top]


Building the Actions

Once you have entered all the relevant information in the builder window, you can generate the actions.

To build Search or New Record actions in an application file
  1. Open a builder window (if it is not already open).
  2. Enter the required information.
    • For information on using the Search Builder, see Chapter 11.
    • For information on using the New Record Builder, see Chapter 12.
  3. Click Build Actions.

    The builder checks to see if you have entered all the information required to build the actions.

  • If you have not, an error message appears and the build process stops.
  • If you have, it builds the actions required to perform the task.

! Tip: Click Build & Close instead of Build Actions to build actions and close the builder window in one step.


For information on generating actions in the Search Builder, see "Actions Built by the Search Builder". For information on generating actions for the New Record Builder, see "Actions Built by the New Record Builder".

On completion, the actions appear in the builder group.

You can view the hierarchy of a builder in an application file. Click the disclosure triangle to expand or collapse the builder group accordingly.

When building actions, the builder replaces any existing actions in the group:

  • If the builder group is empty, the actions are inserted into the builder group.
  • If the builder group only contains the actions that were generated by the builder and those actions have not been modified, the new actions replace the old actions within the builder group.
  • If there are actions in the builder group that the builder did not generate, or the actions in the builder group have been modified, a message box appears.
  • To replace all actions in the builder group with the new actions, click Yes.
  • To stop the build action, click No.


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



docs@pervasive.com

Copyright © 1999, Pervasive Software. All rights reserved.