INIT
(Available in 01 TS COM - TS_COM_IDispatch)
Purpose
Create a 'TS_IDispatch' instance
Syntax
oIDispatch:=TS_IDispatch{ [oIOwner], [symNameSym], [lCountThisComponent], ; ...
...[uoInvokeHandler] }
Arguments
uoIOwner
|
NIL, OBJECT(TS_IUnknown)
|
usymNameSym
|
NIL, SYMBOL
|
ulCountThisComponent
|
NIL, LOGIC
|
uoInvokeHandler
|
NIL, OBJECT
|
Description
This class serves no purpose on its own, the class should be used as a derived from class when defining you own application classes.
Example
CLASS SomeIClass INHERIT TS_IDispatch
METHOD INIT( ..., ... ; ...
...) CLASS SomeIClass
// Less secure ( and simple ) form of an '[less]safe' init method
// It is better not to call any object method/access/assign from
// inside the init method, if needed do this form the 'New()' method.
// From here on insert you own initialization code
// Process the parameters
..., ...
IF lParameterError
TSTrace Warning "... parameter error ..."
SELF:InvalidateObject( )
END
// At this point all initialization code should be done
IF SELF:IsValidObject
// The 'New()' method will be called by the SUPER class
SUPER:INIT( ... ; ...
... , ... )
ELSE
TSTrace Warning TS_TEXT_GEN_CAN_NOT_INITIALIZE
SELF:InvalidateObject( )
END
RETURN SELF
METHOD INIT( ..