Good evening,
I noticed some unexpected behaviour in B4A 7.80. There are two issues I noticed. Here they are:
First Issue:
Watch this code:
Let's say we run this code recursive. In the first pass we send the variable="var1". The condition = true and it calls the recursive with variable2="var2". We get in the sub for the second pass and this time the some_condition = false and it continues to sleep(0). The code execution will continue in the first pass and then in the second. It's like having multiple threads that intermix. If we remove the Sleep(0) everything works linearly. That was tested in an Android 7.0 Emulator.
Second Issue:
Let's suppose we add a class named Book.
Watch this code:
If we try to access BI from another module. The BI variable is not appearing. If we now transform the code as follows (adding some lines between the BI Variable and the type and the Panel), the BI variable shows in the intelligence of the class.
Thanks for taking the time to read this.
I noticed some unexpected behaviour in B4A 7.80. There are two issues I noticed. Here they are:
First Issue:
Watch this code:
B4X:
Sub Recursive(variable as string)
line 1
line 2
if some_condition = true then
Recursive(variable2 as string)
End if
Sleep(0)
line 3
line 4
End Sub
Let's say we run this code recursive. In the first pass we send the variable="var1". The condition = true and it calls the recursive with variable2="var2". We get in the sub for the second pass and this time the some_condition = false and it continues to sleep(0). The code execution will continue in the first pass and then in the second. It's like having multiple threads that intermix. If we remove the Sleep(0) everything works linearly. That was tested in an Android 7.0 Emulator.
Second Issue:
Let's suppose we add a class named Book.
Watch this code:
B4X:
Private Sub Class_Globals
Type BookInfo(Title as String, _
Writer as String, _
Pages as Int, _
ISBN as String)
Dim BI As BookInfo
Dim pnl as Panel
End Sub
If we try to access BI from another module. The BI variable is not appearing. If we now transform the code as follows (adding some lines between the BI Variable and the type and the Panel), the BI variable shows in the intelligence of the class.
B4X:
Private Sub Class_Globals
Type BookInfo(Title as String, _
Writer as String, _
Pages as Int, _
ISBN as String)
Dim BI As BookInfo
Dim pnl as Panel
End Sub
Thanks for taking the time to read this.
Last edited: