The automation interface
In PowerBuilder, an OLEObject is your interface to an OLE
server or ActiveX control. When you declare an OLEObject variable
and connect to a server, you can use dot notation for that variable
and send instructions to the server. The instruction might be a
property whose value you want to get or set, or a function you want
to call.
The general automation syntax for an OLEObject is:
1 |
<span>oleobjectvar</span>.<span>serverinstruction</span> |
For OLE controls in a window, your interface to the server
or ActiveX control is the control’s Object property, which
has a datatype of OLEObject.
The general automation syntax for an OLE control is:
1 |
<span>olecontrol</span>.<span>Object</span>.<span>serverinstruction</span> |
server
When you compile scripts that apply methods to an OLEObject
(including a control’s Object property), PowerBuilder does
not check the syntax of the rest of the command, because it does
not know the server’s command set. You must ensure that
the syntax is correct to avoid errors during execution.
Make sure you give your applications a test run to ensure
that your commands to the server application are correct.
What does the server support?
A server’s command set includes properties and methods
(functions and events).
OLE server applications publish the command set they support
for automation. Check your server application’s documentation
for information.
For custom controls and programmable OLE objects,
you can see a list of properties and methods in the PowerBuilder
Browser. For more information about OLE information in the Browser,
see “OLE information in the Browser “.