VisualAge Help
Use the OLE Class Generator window to create classes that
wrapper the capabilities of OLE Controls and other OLE automation
objects.
Fields
Push buttons
Select Generate to generate the new class (if necessary) and the
appropriate selectors.
Select Close to close the OLE Class Generator window.
In the OLE object information field, specify
the information related to the OLE object you want to create a wrapper class
for.
- Controls
- Select this radio button if you want to query the system registry for the
names of all registered OLE controls. The names appear in the drop-down
list.
- Other
- Select this radio button if you want to query the system registry for the
names of registered OLE objects other than OLE controls. The names
appear in the drop-down list.
- Details
- Select this push button to open the help for the selected control, if help
file information was found in the system registry.
After you select an object, the name of the selected object appears in the
field to the right.
In the Code generation options field,
specify options related to the wrapper class that will be generated.
- Select View if the generated class is used to wrapper an OLE
control that will be used as a VisualAge view. New classes will be
created as subclasses of AbtOleControlView.
- Select Widget if the generated class is used to wrapper an OLE
control that will be used as a Smalltalk widget. This option is for use
by Smalltalk programmers who do not use the VisualAge visual programming tools
to construct user interfaces. New classes will be created as subclasses
of AbtOleExtendedWidget.
- Select Object wrapper if the generated class is used to wrapper
a nonvisual OLE control or OLE automation object. New classes will be
created as subclasses of AbtOleObjectWrapper.
- In the combo box, select the name of the class where the generated
selectors will be stored. If the class you want to use does not exist,
type the name directly into the field, and the OLE Class Generator will create
the class, subclassed as determined by your selections, when you select
Generate.
In addition, you can select several additional options:
- Select Generate VA interface if you want the OLE Class
Generator to build a VisualAge public interface for the generated
class. For parts that are to be used in the VisualAge composition
editor, this option should be checked. This option is checked by
default.
- Select Smalltalk feature names if you want the OLE Class
Generator to use Smalltalk naming conventions when saving VisualAge feature
information. (In many cases, the naming conventions for OLE object
properties is not consistent with Smalltalk naming conventions.)
- Select Use method return type to request that any value
returned by an OLE method invocation be answered by the generated VA
method. Some OLE automation servers such as Microsoft Word have methods
that fail if the returnType is requested. For these cases,
unchecking Use method return type prior to code generation will
cause generated code not to request the return value when invoking the OLE
method.
- Select Include optional arguments if you want the generated
code to be saved without optional arguments. (Some OLE objects contain
methods that have optional parameters.) If optional arguments are
generated, the programmer must ensure that valid (non-nil) values
are passed in these arguments at run time.
In the Code generation items field, you
can set options related to the individual items that will be generated.
The list shows the OLE properties, methods, or events, along with the
Smalltalk class names that will be generated. The third column
indicates whether the object will be included in the generated class.
- Select Properties to see a list of all of the OLE properties
for the selected OLE object. The OLE Class Generator will map each OLE
properties to a VisualAge attributes with a getter and setter method will be
created for each.
- Select Methods to see a list of all of the OLE events for the
selected OLE object. The OLE Class generator will map OLE events into
VisualAge events. Event handler methods are generated which are used to
signal VisualAge events when a given OLE event is detected.
Note: | VisualAge has default event handlers for the events KeyDown,
KeyUp, MouseDown, MouseMove, and
MouseUp. These events are excluded from code generation by
default. You can choose to in include these events if you want to
override the default event handlers.
|
- Select Details to open the help for the selected property,
method, or event, if help file information was found in the interface
information for the object.
- Select Separate class to open a separate view to allow code
generation of the selected property. This button is enabled only if the
selected property or method returns an OleAutomationObject as its
type.
Use the OLE Object Wrapper Generation window to specify
the options for generating a separate object wrapper class for an OLE property
of type OleAutomationObject, or a method that returns an
OleAutomationObject. Specify the information in the Code generation options and code generation items fields just as you
would for any OLE wrapper class.
[ Top of Page | Previous Page | Next Page | Table of Contents ]