| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (16 out of 19)

Creating New Classes Programmatically

You can create new definitions interactively, by instantiating and completing a definition as described previously in this chapter, or programmatically, by writing procedures that use some combination of these actions and capabilities:

To create a definition programmatically:

  1. Execute:

    where:

    When you clone an existing definition, the clone has the same attribute values as the original except for the Class-name, which reverts to none.

  2. Transfer the cloned definition to the workspace on which you want it to reside.

  3. Make the definition permanent.

  4. Use conclude as needed to give the new definition the name, class-specific attributes, and default values that you need.

By default, any items created with the create action are transient. Definitions must be permanent items before they define classes and can have any instances or subclasses.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (16 out of 19)

Copyright © 1997 Gensym Corporation, Inc.