PowerBuilder provides several wizards to facilitate the development and deployment of COM components:
Target wizard Creates a new application, a new custom class user object, and a new project
Object wizard Creates a new custom class user object in an existing application and creates a new project
Project wizard Creates a project you use to build a COM server and optionally a COM+ package from one or more existing custom class user objects
When you create a new user object using a COM/COM+ Target or Object wizard:
The object has two new events: Activate and Deactivate.
The object has COM validation support enabled.
If you checked the box on the last page of the wizard, the wizard adds items to a To-Do List to remind you to complete all phases of development.
New objects If you plan to build a server containing a single new custom class user object, use the Target or Object wizard to take advantage of these features.
If you plan to build a server containing multiple new custom class user objects, using the Target or Object wizards will give you a separate project for each object, so you will need to add all the objects to one of the projects and discard the other projects.
Alternatively, you can create new custom class user objects without using the Target or Object wizards and then create the project later using the Project wizard or the Project painter.
You can enable COM validation and add the Activate and Deactivate events as user-defined events in the User Object painter. For more information, see “COM validation”.
Existing objects If you have one or more custom class user objects that you want to deploy as COM servers, make sure that they meet the requirements described in “Defining the component interface” and the subsequent sections. As for new user objects, you can enable COM validation and add the Activate and Deactivate events as user-defined events in the User Object painter. When you are ready to build the server, you can use the Project wizard to set up the project.