Using the following code:
is there a way to have the sub "checkConn" return a value according to the value returned from "FTP1_ListCompleted"?
Thank you
B4X:
Sub checkConn
FTP1.Initialize("FTP1", "xxx.xxx.xxx.xxx", 21, "xxxxx", "xxxxxx")
FTP1.PassiveMode=True
FTP1.List("/")
End Sub
Sub FTP1_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
'Log(ServerPath)
If Success = False Then
Return 0
ToastMessageShow("Not connected",False)
Else
Return 1
ToastMessageShow("Not connected",True)
End If
End Sub
is there a way to have the sub "checkConn" return a value according to the value returned from "FTP1_ListCompleted"?
Thank you