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

Using Connections

GMS provides two types of connection for linking template objects into a menu specification: the submenu connection and the peer menu connection. The two types of connections have different colors; peer connections are green, while submenu connections are yellow.

Submenu Connection

A submenu connection connects two adjacent entries that represent a parent-child or superior-subordinate relationship in a menu structure, specifically connecting:

Peer Menu Connection

Connects two adjacent entries in a sibling relationship at the same level in a menu specification. You use a peer menu connection to connect two adjacent cascade menu templates or two adjacent leaf entry templates.

Managing Connection Stubs

Every root template (except dynamic popup) on the GMS Palette has one connection stub, an output stub of class SUBMENU-CONNECTION. However, entry and divider templates on the palette do not have connection stubs, because GMS cannot anticipate which stubs you will need in a given menu specification.

Instead, you create stubs when you need them and remove any that you do not use by choosing commands from templates' G2 menus. You can use these commands in any order that is convenient to provide the connection stubs you need and remove any that you do not use.

To add submenu connection stubs to a cloned template object:

A submenu connection stub appears centered on each side of the template. The stubs are directed:

You can use these stubs as needed and ignore any that you do not need.

To add peer menu connection stubs to a cloned template object:

A peer menu connection stub appears centered on each side of the template. The stubs are directed:

You can use these stubs as needed and ignore any that you do not need.

To remove unused connection stubs from a cloned template object:

All unused connection stubs disappear from the template object. Stubs on other templates are unaffected.

To remove unused connection stubs from all templates in a menu specification:

All unused connection stubs disappear from every template object in the specification. Stubs on other specifications are unaffected.

To connect the templates into a menu specification:

  1. Use stub management commands to make connection stubs appear on templates as needed.

  2. Connect the templates as needed to establish the desired structure. You can attach a connection to a template anywhere, whether or not a connection stub exists there.

  3. Remove any unused connection stubs.


Note: GMS does not let you mix peer and submenu connections, so you cannot create an illegal structure.

The following diagram identifies the connections in a menu specification. The root entry connects to the first cascade entry template, using a submenu connection. The first cascade entry template connects horizontally to the second cascade entry template, using a peer menu connection. These cascading entry templates connect to the first entries in their menus, using submenu connections. Leaf entries further down the menu structure connect to each other using peer menu connections.


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

Copyright © 1997 Gensym Corporation, Inc.