To test or debug a component, you can use a feature of PowerBuilder called live editing that allows you to build the project automatically from the User Object painter. When live editing is enabled, PowerBuilder builds the project for an EAServer component each time you save the corresponding user object. The generator does not deploy PBDs to EAServer, but instead tells EAServer how to access the PBLs that contain the required object definition(s).
Service components You cannot use live editing to test a component that you have set up as a service component. Service components are always in use when the server is running, so the changes that you make in the User Object painter cannot be saved.
To enable live editing for a user object, you need to:
Create a project that includes the user object for which you want to generate an EAServer component.
You can use an existing PBL that allows for deployment to EAServer, or alternatively, you create a new project and use this just for testing purposes.
Optionally modify the live editing library list for the project.
When you are testing a component with a server that resides on a remote machine, you need to tell EAServer where to find the PBLs. To do this, you modify the library list on the Advanced page of the component’s property sheet in the Project painter, shown below:
The library list you specify must contain fully qualified paths that use Universal Naming Convention (UNC) names. UNC names take the form: \\servername\sharename\path\file
By default, the live editing library list is based on the application library list. You do not need to modify the live editing library list if your server is local.
Specify the project that will be used to generate the component in the User object painter.
Enter the project name in the EAServer Project field, which is located on the General property page of the user object property sheet shown below.
The project name you specify must meet these requirements:
It must be an EAServer component project.
It must include the user object that you currently have open in the User Object painter.
The library list for the project must match the current application library list.
To generate an EAServer component from the User Object painter, select File>Save.
When you build a project from the User Object painter, PowerBuilder performs these operations:
Generates CORBA IDL that describes the nonvisual object you saved
The IDL is in turn used to build stubs and skeletons. The names of the IDL file, the stubs, and the skeletons are based on the name of the object.
The component generator stores the new IDL in the Repository subdirectory of the EAServer installation directory.
Generates a PROPS file that describes the properties of the EAServer component
The PROPS file is stored in the following subdirectory of the EAServer installation directory: Repository\Component\package-name
PowerBuilder builds the component just as it would at deployment time, except that it does not generate PBDs for the component. In addition, it sets the pb.live_edit property to TRUE and assigns the library list you specified for live editing to the pb.librarylist property.
If the project build results in errors, PowerBuilder displays the error messages in the Output window.
If instance pooling is enabled for the user object, the generator disables pooling for the current build. Pooling is not supported with live editing because PowerBuilder cannot save the user object if the PBL that contains the user object is locked by EAServer.