OLE information in the Browser
The system stores information about the OLE server applications
and OLE custom controls installed on your computer in the registry.
PowerBuilder reads the registry and displays the registration
information for all registered OLE servers and custom controls.
To view the OLE information:
-
Click the Browser button on the PowerBar.
-
Click the OLE tab in the Browser.
There are three categories of OLE object, as shown in Table 19-8.
OLE object category |
Description |
---|---|
Insertable objects |
OLE servers that can link or embed objects |
Custom controls |
ActiveX controls that can be included |
Programmable objects |
OLE servers to which you can send automation instructions. |
When you expand each of these categories, you see the individual
OLE servers that are installed. Each OLE server can also be expanded.
The information provided depends on the category.
Class information
All the categories provide class information about the OLE
server. You see a list of registry keys. Some of the keys are meaningful
in their own right and some have values. The values, or simply the
presence or absence of keys, tell you how to find the OLE server
and what it supports.
Table 19-9 lists
some typical keys and what they mean.
Registry key |
Value |
---|---|
GUID |
The global unique identifier for the |
TypeLib – GUID |
The global unique identifier for the |
ProgID |
A string that identifies the OLE server |
VersionIndependentProgID |
A string that identifies the OLE server |
InprocServer32 |
The name of the file for the 32-bit version |
ToolboxBitmap32 |
The name of a bitmap file for the 32-bit |
DefaultIcon |
The name of an icon file or executable |
Version |
The version number of the OLE server |
Insertable |
No value – specifies that the |
Control |
No value – specifies that the |
Verb |
No value – specifies that the |
In addition to registry information, the Browser displays
the properties and methods of ActiveX controls and programmable
objects. To provide the information, PowerBuilder uses the registry
information to query the ActiveX control for its properties and
methods. The information includes arguments and datatypes.
Browser as script-writing tool
Take advantage of the Browser when writing scripts. You can
find property and function names and paste them into your scripts.
The Browser provides the full syntax for accessing that property.
To paste OLE information into a script:
-
Open the Browser.
-
Click the OLE tab.
-
Expand the list to find what you want. For example,
find the ActiveX control you want and expand the list further to
find a property. -
Highlight the property and select Copy from the
pop-up menu. -
Position the insertion point in the Script view
and select Paste from the pop-up menu.The Browser inserts syntax like this into your script:
1OLECustomControl.Object.NeedlePositionAfter you change OLECustomControl to the actual name of your
control, your script correctly accesses the NeedlePosition property.
What the Browser pastes into your script depends on what you
have selected. If you select an object (a level above its properties
in the hierarchy), PowerBuilder pastes the object’s ProgID.
You can use the ProgID in the ConnectToNewObject function.