I'm trying to create a FUNCTION like:
but I get this exception:
java.lang.RuntimeException: Cannot parse: (RemoteResumableSub) anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub@21f819e0 as boolean
It seems (to me) that "Wait For", returns the control to the calling code also returning an Httpjob object (jobResult) to it (in this case), while the function would like to return a boolean.
How should I create a function like this?
Thank you
B4X:
Sub DownloadFile(FileName As String) As ResumableSub
Dim Result As Boolean
Dim HJob As Httpjob
' ...
' ...
Wait For (HJob) Jobdone(jobResult As HttpJob)
If jobResult.Success...
'...
Result = ---
' ...
Result = ---
'...
Return Result
End Sub
but I get this exception:
java.lang.RuntimeException: Cannot parse: (RemoteResumableSub) anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub@21f819e0 as boolean
It seems (to me) that "Wait For", returns the control to the calling code also returning an Httpjob object (jobResult) to it (in this case), while the function would like to return a boolean.
How should I create a function like this?
Thank you