Code: Select all
flashobject\invoke("CallFunction('" + cmd + "')")
Code: Select all
# CallFunction
# [b]retType: string[/b]
# params:
# request
# in:True out:False optional:False type:string
#
Code: Select all
flashobject\invoke("CallFunction('" + cmd + "')")
Code: Select all
# CallFunction
# [b]retType: string[/b]
# params:
# request
# in:True out:False optional:False type:string
#
---I post this thread at the error section....srod wrote:Invoke() should not be used to retrieve a property value.
----CallFunction is NOT property,but a METHOD at flash control
Use GetStringProperty() instead in the case you outline.
btw, why are you posting this in the Tricks 'n' Tips section?
Code: Select all
Procedure.s COMateClass_InvokeReturnStringMethod(*this._membersCOMateClass, command$)
Protected result.i = #S_OK, retVar.VARIANT, result$
If command$
result = COMateClass_INTERNAL_Invoke(*this, #DISPATCH_METHOD, #VT_BSTR, retVar, command$)
If SUCCEEDED(result) And retVar\bstrVal
result$ = PeekS(retVar\bstrVal, -1, #PB_Unicode)
EndIf
VariantClear_(retVar)
Else
result = #E_INVALIDARG
EndIf
;Set any error code. iDispatch errors will alreay have been set.
COMateClass_INTERNAL_SetError(*this, result)
ProcedureReturn result$
EndProcedure
Code: Select all
...
rr.s = flashobject\GetStringProperty("CallFunction('" + cmd + "')")
Debug rr
...