Several standard class user object types are inherited from predefined global objects used in all PocketBuilder applications:
Transaction (SQLCA)
Error
Message
If you want your standard class user object to replace the built-in global object, you tell PocketBuilder to use your user object instead of the built-in system object that it inherits from. You will probably use this technique if you build a user object that inherits from the Error or Message object.
In Figure 14-3, user objects have been assigned to replace the default Transaction and Error objects.
Figure 14-3: Replacing default global objects
To replace the built-in global object with a standard class user object:
Open the Application object.
In the Properties view, click the Additional Properties button on the General tab page.
In the Application properties dialog box, select the Variable Types tab.
Specify the standard class user object you defined in the corresponding field and click OK.
After you have specified your user object as the default global object, it replaces the built-in object and is created automatically when the application starts up. You do not create it (or destroy it) yourself.
The properties and functions defined in the user object are available anywhere in the application. Reference them using dot notation, just as you access those of other PocketBuilder objects such as windows.
You can use a user object inherited from one of the built-in global objects by inserting one in your user object as described in “Using class user objects”. If you do, your user object is used in addition to the built-in global object variable. Typically you use this technique with user objects inherited from the Transaction object. You now have access to two Transaction objects: the built-in SQLCA and the one you defined.
For more information about using the Error object, see “Using the Error object”.
For information about using the Message object, and about creating your own Transaction object, see the Resource Guide.