B4J Question retriev result from sub with inner Wait For

giannimaione

Well-Known Member
Licensed User
Longtime User
see attach files.

please, no use variable global
read comment into project
 

Attachments

  • WaitFor.zip
    2.1 KB · Views: 88

giannimaione

Well-Known Member
Licensed User
Longtime User
because in my project, first post, there is a disabled "sub ugly" and it don't like me.
you proposed same "sub and wait for" !!!
many and many "wait for" ... :mad: :mad: :mad:
maybe it's only way possible to "return" parameter ?

why it is not possible?
B4X:
Private Sub doSomething As List
 '(resumable subs return type must be resumable or none) error !!! why???
    DoBigJobs
    Wait For okJobs (result As List)
    Log ("=== here is ok ===")
    For i = 0 To result.Size - 1
        Log(result.Get(i))
    Next
    return result 'error !!!! why?
End Sub
it is easy
B4X:
sub Easy as list
dim myList as list
....
...
..
return myList
end sub
[code]
 
Upvote 0
Top