D
Deleted member 103
Guest
Hi,
please gaze at my code. It works up to a number and then displays an error message.
please gaze at my code. It works up to a number and then displays an error message.
'ERROR
'main_show_log (java line: 359)
'java.lang.NumberFormatException: 1.00081E7
'...
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim Thread1 As Thread
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim args(0) As Object
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Thread1.Initialise("Thread1")
Thread1.Start(Me,"go_Thread1", args)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub go_Thread1
Dim vorZeichen As String =""
Dim obj(1) As Object
Dim number As Long = 9999100 'it works up to this number
For number = 9710100 To 10220000 Step 1000
obj(0) = vorZeichen & Abs(number)
Thread1.RunOnGuiThread("Show_Log",obj)
Next
End Sub
Sub Thread1_Ended(fail As Boolean, error As String) 'An error or Exception has occurred in the Thread
Log("Thread1 Ended: fail= " & fail & " :error=" & error)
End Sub
Sub Show_Log(obj As Object)
Dim number As Long = obj
Log(number)
End Sub