B4J Question Resumable Subs with Java Inline Code?


Licensed User
Longtime User
dear community,

i am doing some filesearching on the local disk with a inline Java call.
now i want to use the new Resumable Subs Functionality in this setup to let the GUI responsible:

'just fragmentary:
'Sub which is calling the inline Java:
Sub searching (path As String,name As String)
    Private nativeMe As JavaObject=Me
    mylistview.Items.AddAll(nativeMe.RunMethod("getTheFiles",Array(path,name))    'walk file tree
 End Sub

'inline Java which is doing the heavy searching:
#If java

public static void getTheFiles(String dir, String pattern) throws IOException {
#End If

the questions are:

1) where and how could i use the "Sleep" Keyword in such a setup?
2) or is it a better way with the Wait For event?
But which event?

thanks a lot


Licensed User
Longtime User
thank you erel.
i thought so that its not possible inline. so i assumed my question 2) :D
i will try your suggestion.
Upvote 0