This is related to a http job efectively, with httputils2 library.
When i do an job.download , this causes a crash.
I've allready tried to change job.download with job.poststring... but same result.
I dont try to download some file, but just using job.download to send a http order to a http machine.
This is the code into my toogle button:
Sub tog_CheckedChange(checked As Boolean)
Dim index As Int
index = clv1.GetItemFromView(Sender)
Dim pnl As Panel
pnl = clv1.GetPanel(index)
Dim tog As ToggleButton
tog = pnl.GetView(2)
Dim btn As Button
btn = pnl.GetView(1)
If checked Then
Job2.Initialize("job2", Me)
Job2.Username = manager.GetString("user")
Job2.Password = manager.GetString("pass")
Job2.Download("http://"&ServerIp&":"&port&"/leds.cgi?led="&index)
Job2.Release
btn.Enabled = False
Else
Job2.Initialize("job2", Me)
Job2.Username = manager.GetString("user")
Job2.Password = manager.GetString("pass")
Job2.Download("http://"&ServerIp&":"&port&"/leds.cgi?led="&index)
Job2.Release
btn.Enabled = True
End If
End Sub
I'm using a samsung galaxy s8 smartphone... dont having space issues...
Same problem into a button_click sub:
Sub Button_Click
Dim index As Int
index = clv1.GetItemFromView(Sender)
Dim pnl As Panel
pnl = clv1.GetPanel(index)
Dim btn As Button
btn = pnl.GetView(1)
Dim indexOK As String = index +1
Log(txtMsg.Text)
Job2.Initialize("job2", Me)
Job2.Username = manager.GetString("user")
Job2.Password = manager.GetString("pass")
Job2.Download("http://"&ServerIp&":"&port&"/preset.htm?RLY"&indexOK&"=1")
Job2.Release
ToastMessageShow("Impulsion Envoyé",True)
End Sub