When you create a class or subclass interactively or programmatically, the class is stored in the class library that you specify. If the class library exists, the class is added to the class library.
To add a class to a class library
-
Open the class library in the Class Browser.
For more information about opening class libraries, see How to: Open Class Libraries.
-
In the class list of the Class Browser, select the class library you want to add a class for.
-
In the Class Browser, click the New Class button.
The New Class dialog box opens so you can specify information for the new class.
-
Follow the steps for creating a class or subclass. For more information, see How to: Create Classes and Subclasses.
When you finish creating and saving the class, the class appears in the class library displayed in the Class Browser.
To add a subclass to a class library
-
Open the class library in the Class Browser.
For more information about opening class libraries, see How to: Open Class Libraries.
-
In the class list of the Class Browser, select the class you want to create a subclass from.
-
In the Class Browser, click the New Class button.
The New Class dialog box opens so you can specify information for the new class. The class you selected appears by default in the Based On box.
-
Follow the steps for creating a class or subclass. For more information, see How to: Create Classes and Subclasses.
When you finish creating and saving the subclass, the subclass appears in the class library displayed in the Class Browser.
To add classes to class libraries programmatically
-
Use the ADD CLASS command.
For example, the following line of code adds the class MyClass to MyClassLibrary:
В | Copy Code |
---|---|
ADD CLASS MyClass TO MyClassLibrary2 |
For more information, see ADD CLASS Command.