Android Question Wait For FTP Upload Completed - Compiling Error

DaOel

Member
Licensed User
Longtime User
Hello!
I have the following problem: Whenever I add a Wait For FTP Upload Completed Statement into a B4A service I receive the following error message while compiling:

B4A version: 7.01
Parsing code. (0.21s)
Compiling code. (0.48s)
Compiling layouts code. (0.03s)
Organizing libraries. (0.00s)
Generating R file. (0.13s)
Compiling debugger engine code. Error
javac 1.8.0_131
shell\src\b4a\fahrstundenPlaner\syncroservice_subs_0.java:16: error: cannot find symbol
this._serverpath = _serverpath;
^
symbol: variable _serverpath
1 error

For now i would only like to show this part of code (I think its the only relevant pieces) The whole program became huge...

B4X:
[...]
GlobalFunctions.WriteALLStudentsToCSV
wait for FTP_UploadCompleted (ServerPath As String, Success As Boolean)
[...]

[...]
Sub FTP_UploadCompleted (ServerPath As String, Success As Boolean)
    If LastException.IsInitialized Then
[...]

End Sub

without the Wait For Part it compiles without problems.

Globalfunctions.WriteAllStudentsToCSV is a function within a 'code module', that contains an ftp.upload() function.
(*ftp object is declared within the starter service.)
 

DonManfred

Expert
Licensed User
Longtime User
code modules can not receive events. Put the sub into a class, a activity or a service.
I suggest to use the starter service for this....
 
Upvote 0
Top