| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (7 out of 11)

Interacting With G2

G2 provides a highly interactive and highly customizable environment for collecting and organizing knowledge:

By default, after selecting an object that appears on the screen, you choose from a menu. The menu lists operations that are relevant to that object. You can also select from other menus that affect developer's environment settings, such as whether G2 displays long menus or short menus or automatically highlights invoked rules.

In various ways you can customize how the application's users, and how other G2 developers, work with the objects in the current KB:

Operating the Current KB

After G2 has started and if the current KB contains knowledge that you want to work with, you can operate the KB, which means to use G2's default menus to start, pause, resume, reset, or restart the current KB.

Because you can easily operate the current KB, you can quickly test and determine the effects of changes in the KB's objects. Note, also, that you can make many changes to your KB's objects, including in the definitions of classes, while the KB is running. For more information, see Chapter 3, Knowledge Bases.

Starting the current KB causes G2 to perform several standard tasks, all related to activating some or all of the KB's knowledge. Activating an object causes G2 to do something with it, based on the object's class. Activation of objects is described in Chapter 4, Workspaces.


Note: To perform an operation programmatically means that you perform it by invoking an executable item. To perform an operation programmatically requires that the current KB is running.

Pausing and resuming the current KB does just that. No knowledge about the status of executing items is lost due to pausing the KB.

Resetting the KB means to restore all knowledge in the KB to its initial state.

Restarting the KB means to reset the KB then start it, in one command.

Using Menus to Operate on an Object in the KB

By default, you use menus to interact with objects in the current KB. We say "by default," because you can use configurations to suppress the display of any default menu or any default menu choice available in the developer's environment.

To work interactively with a particular object in the current KB, click the mouse on the object to display its menu. The menu choices that are common to the KB's objects (that is, to its items) are described under Using Item Menus.

Using Menus to Affect the Developer's Environment

You also use menus to interact with G2's developer's environment. To affect a feature or setting in the developer's environment, select from G2's Main Menu and from the Miscellany menu.

To display G2's Main Menu:

Choices on the Main Menu

By default, G2's Main Menu displays these choices:

Choices on the Miscellany Menu

By default, G2's Miscellany menu displays these choices:

Clearing the KB

Clearing the current KB means to delete all knowledge from the current KB and to reset the empty KB's system tables to their default values.

Connecting to and Disconnecting From a Foreign Image

Connecting to a foreign image means to establish a network connection with a running executable image, whose procedures the current KB's procedures can invoke. Disconnecting from a foreign image means to break a network connection that was previously established. For more information, see Chapter 53, Foreign Functions.

Creating a New Module

Creating a new module means to add a new module object and its associated set of system tables to the current KB's module hierarchy. This module cannot serve as the current KB's top-level module. For more information about modules, see Chapter 5, Modules and Modularized KBs.

Displaying Network Information

Displaying network information means to display the TCP/IP port number and/or the DECnet portname on which this G2 listens for connections from other processes across your network. This information also appears in the G2 title block.

Displaying the Title Block

This means to display G2's title block, as shown in Starting G2.

Entering or Simulating Package Preparation Mode

Entering package preparation mode means to set G2's developer's environment so that you can prepare the current KB for customer distribution. Simulating package preparation mode means to set G2's developer's environment so that your G2 behaves as if it were authorized to run the proprietary current KB.

For more information about using these menu choices, see Chapter 47, Package Preparation.

Neatly Stacking Windows

Neatly stacking windows means to relocate the current KB's visible workspaces so that they appear to cascade from the upper left corner of G2's window.

Selecting Long or Short Menus

By default, G2's developer's environment presents all menu choices on long menus. You can alternatively select G2's default menu choices from short menus, which display more of the default choices in submenus.

The next two figures show the same default G2 menus when long menus and short menus are in effect. Notice in the figures that selecting long menus or short menus affects the display of the Main Menu, the Miscellany submenu, and the KB Workspace menu, but does not affect the display of the object's menu.

Differences in the Default Displays of Menus, Part I


Differences in the Default Displays of Menus, Part II


To use long menus to interact with G2:

To use short menus to interact with G2:

Shutting Down G2

Shutting down G2 means to exit G2. Shutting down causes G2 to interrupt and end all its processing, close any open files, and release its resources to your computer's operating system.

Navigating Among the KB's Knowledge

After the current KB contains some number of objects, you will need a convenient way to navigate the KB's class and workspace hierarchies and to find particular objects. G2's Inspect facility, another feature of G2's developer's environment, provides this capability.

The Inspect facility is described in Chapter 38, The Inspect Facility.

Notifying the User of Errors

An error condition is any unintended or unexpected discrepancy that occurs while G2 is handling information. G2 can detect an error condition whether the current KB is running or not.

In general, G2 responds to error conditions by invoking an error handler. An error handler manages error signals and produces error messages, if necessary.

G2 includes a default error handler. When the current KB is reset or paused, G2's default error handler responds to most error conditions by posting a message on the Operator Logbook. After you start the current KB, if an error condition occurs, G2 responds by invoking either its default error handler or a custom error handler defined in the current KB.

G2 error handling is described in Chapter 41, Error Handling.

You can define a custom error handler that responds to error conditions that occur while a procedure is running. To do so, include the on error statement in each procedure that must respond to error conditions in an application-specific manner. After the on error statement, specify a block of statements to be performed when an error condition is detected within that procedure.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (7 out of 11)

Copyright © 1997 Gensym Corporation, Inc.