Workbench User Guide : 12. Working With Classes : How You Can Create User Classes : Create a User Class
 
Share this page                  
Create a User Class
You can create a user class using the Create User Class dialog.
To create a user class
1. Select the application in which you want to create the user class in the Applications portlet of the Develop tab.
2. Click the header bar of the Components portlet to make it active.
3. Click File, New, User Class.
The Create User Class dialog appears.
4. Enter the user class name in the Name entry field (for example, My_User_Class).
5. (Optional) Enter a comment for the component in the Remark field.
6. (Optional) Select the Derived toggle field to choose a parent class for your user class.
The Create User Class dialog changes, allowing you to select an application and a parent class, and to choose whether to qualify the superclass.
7. Click Create.
Workbench displays the Class Editor, where you create the individual attributes and methods for the class.
Note:  By default, the name of the parent class specified in Step 6 appears in the Superclass option field. If you want to specify a different superclass, proceed to the next step. If, however, the specified superclass is correct or if you want to accept the default system superclass, userobject, proceed to Step 7.
8. If you want, specify a new superclass in either of the following ways:
Select Qualify Superclass Name by selecting the option.
Or follow these steps:
a. In the Superclass field, enter the name of a user class from the current application or any included applications.
b. Click List Classes and select a class from the Select a Class dialog that appears.
c. Click OK.
The name of the user class you selected is displayed in the Superclass field.
9. Create the attributes for the user class (to supplement any attributes inherited from the superclass), as described in Create Attributes for a User Class.
10. Change or delete the default extended properties (tagged values) for the class that were created during the Create Attributes step or add your own properties, as described in Edit Tagged Values for a User Class, Attribute, Method, Field, or Frame.
11. Create the methods for the user class (to supplement any methods inherited from the superclass), as described in Create Methods for a User Class.
12. Save the user class using one of the commands from the Class Editor's File menu.
The user class is added to the Components portlet.