'Code module
'Subs in this code module will be accessible from all modules.
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim req As HttpRequest
Dim Abfrage_URL As String
Dim SQL_String As String
Dim Timer1 As Timer
Dim LIste As List
Dim fertig As Boolean
Dim abfrage_HttpClient As HttpClient
Dim Thread1 As Thread
Dim args(0) As Object
End Sub
Sub blbub(SQL_String As String) As List
Thread1.Initialise("Thread1")
Thread1.Start(Null,"test_abfrage",args)
fertig = False
Do While fertig = False
Timer1.Initialize("Timer1",500)
Timer1.Enabled = True
Loop
Return LIste
End Sub
Sub Timer1_Tick
End Sub
Sub test_abfrage
Abfrage_URL = "http://url..../abfrage.php"
abfrage_HttpClient.Initialize("abfrage_HttpClient")
req.InitializePost2(Abfrage_URL, SQL_String.GetBytes("UTF8"))
abfrage_HttpClient.Execute(req,1)
End Sub
Sub abfrage_HttpClient_responsesuccess (Response As HttpResponse,Taskid As Long)
Dim parser As JSONParser
parser.Initialize(Response.GetString("UTF8"))
LIste = parser.NextArray
fertig = True
End Sub
Sub abfrage_HttpClient_ResponseError (Response As HttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
ToastMessageShow("Fehler: " & Reason & ", StatusCode: " & StatusCode,False)
fertig = True
End Sub