Hi, here is my code.
I'm using b4a version 9.50 with Net Library 1.8 in default folder.
Here is my compilation error
B4A Version: 9.50
Java Version: 8
Parsing code. (0.13s)
Building folders structure. (0.02s)
Compiling code. (0.24s)
Compiling layouts code. (0.02s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Generating R file. (0.00s)
Compiling debugger engine code. (1.74s)
Compiling generated Java code. Error
B4A line: 546
Dim sf As Object =FTP.UploadFile(File.DirRoot
javac 1.8.0_40
src\alex\HCMS\Timesheet\nursenotesnew.java:1324: error: incompatible types: void cannot be converted to Object
_sf = parent._ftp.UploadFile(processBA,anywheresoftware.b4a.keywords.Common.File.getDirRootExternal(),parent.mostCurrent._filename,anywheresoftware.b4a.keywords.Common.False,parent.mostCurrent._filename);
^
If I use this code
compilation works fine without error.
Please advise.
Thanks
I'm using b4a version 9.50 with Net Library 1.8 in default folder.
FTP.Upload multiple files:
For i =0 To Qty-1
Cursor1.Position=i
FileName=Cursor1.GetString("VoiceMessageFileName")
If FileName<>"" Then
If File.Exists(File.DirRootExternal,FileName) Then
RecordID=Cursor1.GetInt("ID")
Dim sf As Object =FTP.UploadFile(File.DirRootExternal, FileName, False, FileName)
Wait For (sf) FTP_UploadCompleted (ServerPath As String, Success As Boolean)
If Success Then
Log("VM file was uploaded successfully")
Else
Log("Error uploading VM file")
End If
End If
End If
Next
Here is my compilation error
B4A Version: 9.50
Java Version: 8
Parsing code. (0.13s)
Building folders structure. (0.02s)
Compiling code. (0.24s)
Compiling layouts code. (0.02s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Generating R file. (0.00s)
Compiling debugger engine code. (1.74s)
Compiling generated Java code. Error
B4A line: 546
Dim sf As Object =FTP.UploadFile(File.DirRoot
javac 1.8.0_40
src\alex\HCMS\Timesheet\nursenotesnew.java:1324: error: incompatible types: void cannot be converted to Object
_sf = parent._ftp.UploadFile(processBA,anywheresoftware.b4a.keywords.Common.File.getDirRootExternal(),parent.mostCurrent._filename,anywheresoftware.b4a.keywords.Common.False,parent.mostCurrent._filename);
^
If I use this code
FTP.Upload multiple files without wait:
For i =0 To Qty-1
Cursor1.Position=i
FileName=Cursor1.GetString("VoiceMessageFileName")
If FileName<>"" Then
If File.Exists(File.DirRootExternal,FileName) Then
RecordID=Cursor1.GetInt("ID")
'Dim sf As Object =FTP.UploadFile(File.DirRootExternal, FileName, False, FileName)
'Wait For (sf) FTP_UploadCompleted (ServerPath As String, Success As Boolean)
'If Success Then
' Log("VM file was uploaded successfully")
'Else
' Log("Error uploading VM file")
'End If
FTP.UploadFile(File.DirRootExternal, FileName, False, FileName)
Sleep(4000)
End If
End If
Next
compilation works fine without error.
Please advise.
Thanks