Hi there
In my app, I had a subroutine in a static code module to execute some httpjobs, now with the wait for, I converted my code module to a class and am trying to make thus sub work with waitfor. This sub is called about 30 or so times in my app for different things... So I made an adjustment to try to make this work to no avail. The error is ...
1. In my activities, I renamed "JobDone" to "JobIsDone" this processes the rest of the success /failure processes on the activity.
2. This is how I call this method... (modmashiane being the class name referenced from the starter service)
3. In debug mode, the app hangs on waitfor and does not continue at all.
4. In release mode, the above error is raised.
Can someone please advise? Im trying to avoid having to copy this method from the class to each of my activities that references it.
In my app, I had a subroutine in a static code module to execute some httpjobs, now with the wait for, I converted my code module to a class and am trying to make thus sub work with waitfor. This sub is called about 30 or so times in my app for different things... So I made an adjustment to try to make this work to no avail. The error is ...
B4X:
java.lang.Exception: Sub jobdone was not found.
B4X:
Sub ExecutePHP(frm As Object, pQuery As Map, JobName As String, phpFile As String, phpTag As String)
Dim job As HttpJob
Dim scommand As String
Dim json As String
job.Initialize(JobName, frm)
job.Tag = phpTag
json = Map2QueryString(pQuery)
If Len(json) = 0 Then
scommand = $"${Starter.phpPath}${phpFile}"$
Else
scommand = $"${Starter.phppath}${phpFile}?${json}"$
End If
Log(scommand)
job.Download(scommand)
Wait For(job) JobDone(job As HttpJob)
CallSub2(frm,"JobIsDone",job)
End Sub
1. In my activities, I renamed "JobDone" to "JobIsDone" this processes the rest of the success /failure processes on the activity.
2. This is how I call this method... (modmashiane being the class name referenced from the starter service)
B4X:
dbAction.Initialize
dbAction.Put("action=", "validateuser")
dbAction.Put("email=", txtLoginEmail.text.trim)
dbAction.Put("userpassword=", txtLoginPassword.Text.trim)
Starter.modmashiane.ExecutePHP(Me,dbAction, "validateuser","users.php",txtLoginEmail.Text.trim)
4. In release mode, the above error is raised.
Can someone please advise? Im trying to avoid having to copy this method from the class to each of my activities that references it.