| Prev | Next | Start of Chapter | Next Chapter | Contents | Glossary | Index | Comments | (12 out of 12)

The KB-WORKSPACE Class

A KB workspace is an item of the system-defined KB-WORKSPACE class.

A workspace has its own unique representation. Its appearance is not iconic.

The table of a KB workspace item appears as follows:


The following table summarizes the class-specific attributes of the KB-WORKSPACE class:

Attribute Description
Workspace-margin
Distance in workspace units between the outermost items on the workspace and the innermost stripe of the workspace border.
Allowable values:
Any integer, zero (0) or greater
Default value:
30 workspace units
Notes:
See the section Specifying Margins Within the Border of a Workspace.


Background-color
The background color of the workspace
Allowable values:
Any available color symbol.
Default value:
white


Foreground-color
The foreground color of the workspace
Allowable values:
Any available color symbol.
Default value:
black


Background-images
Names of one or more image definitions, each of which specifies a graphics image that appears as the workspace background.
Allowable values:
none
Name of any image definition item

Default value:
none
Notes:
See the section Using a Graphic as a Background Image.


Frame-style
Name of a frame-style definition, which determines a reusable, custom border for this workspace.
Allowable values:
none
Name of any frame-style definition

Default value:
none
Notes:
See the section Creating Custom Workspace Borders.


Module-assignment
Name of the parent module of this top-level workspace.
Allowable values:
unspecified
Name of any module in the current KB

Default value:
unspecified
Notes:
See the section Associating Top-Level Workspaces with Modules.

Actions that Apply to KB Workspaces

You can use the show and hide actions to control workspaces programmatically. For more information about these actions, see hide, and show.

Expressions that Refer to KB Workspaces

You can use the following expressions for KB workspaces.

To refer to whether a workspace has been activated:

The expression produces a truth-value that indicates whether the specified workspace is activated. For example:

To refer to the workspace of an item:

This expression produces the parent workspace of the specified item. For example:

If the specified item does not have a parent workspace, evaluating this expression causes G2 to signal an error. To prevent this, use this expression with the exists expression, as follows:

This generic if rule checks each item that is upon a workspace, and for each such item whose name is CUSTOM, sets its Status attribute to the symbol ok.

To refer to the subworkspace of an item:

This expression produces the workspace that is the subworkspace of the specified item. For example:

If the specified item does not have a subworkspace, evaluating this expression causes G2 to signal an error. To prevent this, use this expression with the exists expression, as follows:

This generic if rule identifies each custom-object that has a subworkspace and, for each that does and whose name also is CUSTOM, sets its Status attribute to the symbol ok.

To refer to an item upon a particular workspace:

With the the quantifier, this generic reference expression produces the one and only item of the specified class that resides upon the specified workspace. With the any quantifier, this expression produces the set of items of the specified class that reside upon the specified workspace. For example:

| Prev | Next | Start of Chapter | Next Chapter | Contents | Glossary | Index | Comments | (12 out of 12)

Copyright © 1997 Gensym Corporation, Inc.