| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (3 out of 10)

Creating a Rule

You create and edit rules interactively by using the Text Editor. A rule has a text box representation; it does not have an icon.

To create a rule:

  1. Click on the background of a KB workspace.

  2. Select KB Workspace > New Rule.

    G2 displays the Text Editor, shown in the next figure, where you enter the text of the rule. The Text Editor displays prompts for entering one of the five kinds of rules, or the for prefix for entering a generic rule.


  3. Enter the text of the rule and end the editing session by selecting End or pressing Return.

    G2 displays the text box for the rule on the workspace. The text box is attached to the mouse pointer.

  4. Move the mouse to position the rule on the workspace, and click to place the rule.

A completed rule has a text box representation, as shown in this figure:


To edit the text of an existing rule:

G2 displays the Text Editor for editing the text of the rule.

Displaying the Table for a Rule

You display the table for a rule by clicking on the border of its text box.

To display the table for a rule:

  1. Click on the border of the text box of the rule to display its menu.

  2. Select the table menu choice.

For information about specifying the attributes of a rule, see the sections that follow. For a summary of the attributes of a rule, see The Rule Class.

Cloning a Rule

One way of creating new rules is to clone an existing rule.

To create a rule by cloning:

  1. Display the menu for the rule.

  2. Select the clone menu choice.

  3. Move the mouse pointer to position the new rule on the workspace, and click to place the rule.

After you clone a rule, G2 assumes that you will edit its text. G2 assumes you do not want more than one rule in your KB with the same text. Thus, after cloning a rule, G2 changes the status of the rule in its Notes attribute to INCOMPLETE, and displays ... (ellipses) in the text of the cloned rule as shown below:


These two indicators tell you that you must edit or recompile the cloned rule before G2 can invoke it.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (3 out of 10)

Copyright © 1997 Gensym Corporation, Inc.