iOS Question jobdone problem

tufanv

Expert
Licensed User
Longtime User
Hello,

I am poritng a b4a project to b4i. I use:

B4X:
ExecuteRemoteQuery("SELECT version FROM global", "CHECKVERSION")

then i use

B4X:
Sub JobDone(Job As HttpJob)
    Log(Job.JobName)
    If Job.Success Then
    Dim res As String
        res = Job.GetString
        Log("Response from server: " & res)
        Dim parser As JSONParser
        parser.Initialize(res)
        Dim parser2 As JSONParser
        parser2.Initialize(res)
        Select Job.JobName

            Case "CHECKVERSION"
                     lblstatus.text="checking"
End Select
    Else
        hd.toastmessageshow("Error: " & Job.ErrorMessage, True)
        lblstatus.Text = "Status: Connection Failed"
        btnlogin.enabled = True
        hd.progressdialoghide
    End If
    Job.Release
End Sub

I can see the "Class (b4i_httpjob) instance released." message but nothing happens ( I do not get any log , error or anything )and lblstatus.texr is not changing . I am missing something but i cant find what. Any Ideas ?
 
Last edited:

tufanv

Expert
Licensed User
Longtime User
This means that there is a bug in your code somewhere. It is not in the code you posted.

What kind of error can cause this. Do you have any idea so i can look into right place to find the error?

Ty
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
Maybe the job's target is set to a different module.
I have it on main module like this:
B4X:
    Dim job As HttpJob
    job.Initialize(JobName, Me)

I will continue to look for any errors and post back. Thanks for your responses
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
Found the problem. It was a mistake in sub executeremotequery.

Poststring was deactivated with a ' . So it wasnt doing anything. Thanks for all help.
Maybe the job's target is set to a different module.
 
Upvote 0
Top