Create a User Class
In this procedure, you will create a user class for use with the ProjectApp1 application you created in
Create an Application. You can create user classes to create a "wrapper" around the project database table, letting you more efficiently read from and write information to the table. You will add two methods to load and save project data.
To create a user class
1. Select the ProjectApp1 application in the Applications portlet of the Develop tab.
2. Click in the Components portlet to activate it.
3. Click File, New, User Class.
The Create User Class dialog opens.
4. Enter ProjectObject in the Name field.
5. Click Create.
The Class Editor window appears.
6. Click the Attributes tab.
7. Click Edit, Insert, From Database Table.
The Select a Database Table dialog appears.
8. Click List Tables.
The Table Selection dialog appears.
9. Select the project table and click OK.
10. Click OK to close the Select a Database Table dialog.
Defined attributes for each column in the database table are listed on the Attributes tab of the Class Editor.
To create methods for the user class
1. Click the Methods tab.
2. Click Edit, Insert, New.
The Class Editor window appears.
3. Enter the Name LoadProject.
4. Click Create, and then Apply.
5. Click New to add another method.
The dialog is cleared.
6. Enter the Name SaveProject.
7. Click Create, and then Apply.
8. Click Close to close the Method Properties dialog.
The two new methods are listed on the Methods tab of the Class Editor.
Leave the Class Editor open. You can now write the class script that uses the user class.