EDIT: I've done it myself, see the last of my posts
I create a new project and I want to include resummable subs/wait for. Here is the working code
This code is good, but it will crush the app if I will not create another sub with "vers" event name
So the silly question is how to integrate all this in only just one sub completly?
I create a new project and I want to include resummable subs/wait for. Here is the working code
B4X:
'sftp is a ProcessGlobal sftp object
sftp.Initialize("vers","user", "pass", "server", 21)
sftp.DownloadFile("ftp/version.txt",Starter.rp.GetSafeDirDefaultExternal(""),"vers.txt")
Wait For vers_DownloadCompleted (ServerPath As String, Success As Boolean)
If Success Then
Log($"file was downloaded in ${Starter.rp.GetSafeDirDefaultExternal("")}/vers.txt"$)
Else
Log($"Error...${LastException}"$)
End If
sftp.CloseNow
B4X:
Sub vers_PromptYesNo (Message As String)
sftp.SetPromptResult(True)'im my case is a secure server location
End Sub
Last edited: