SendCreateInstance
(Available in 01 TS COM - TS_COM_DelegateIDispatch)
Purpose
Invoke a method, Return value as object
Syntax
oObject:=oDelegateIDispatch:SendCreateInstance( #MyObject, #METHOD [,uValue[] ; ...
...+[,...] ] )
Arguments
usymClass
|
SYMBOL
|
usymName
|
SYMBOL
|
[uParam1..uParamN]
|
USUAL
|
Description
Invoke a method, Return value as object. The method 'Send' could be used to return the same value, except the this method will instanciate a object of the specified class ( 'usymClass' ). For the same property the 'Send' method will return an instance of 'TS_DelegateIDispatch'
Returns
OBJECT, Method return value
Example
METHOD CAMethod( [uParm,...] ) CLASS SomeClass
RETURN SELF:SendCreateInstance( #ItemObject, #METHOD [,uParm[] ; ...
...+[,...] ] )
Source
METHOD SendCreateInstance( usymClass, usymName ) CLASS TS_DelegateIDispatch
LOCAL dwPCount AS DWORD
LOCAL symClass AS SYMBOL
LOCAL symName AS SYMBOL
LOCAL uRetVal AS USUAL
LOCAL aArgs AS ARRAY
LOCAL X AS DWORD
TSTrace Enter usymName
IF SELF:FInit
symClass:=usymClass
symName:=usymName
dwPCount:=PCOUNT( )
DO CASE
CASE dwPCount<