Hi Erel,
If I have an application in the B4A I can pass B4i
Thank you
If I have an application in the B4A I can pass B4i
Thank you
If IsDevTool("B4A") Then
Dim pLocalPhone As Phone
pLocalPhone.HideKeyboard(Activity)
Else
'Why does this generate an error when compiled using B4A. Isn't IsDevTool equivalent to conditional compile
Garbage text
End If
Can someone tell me why does this code generate an error when compiled using B4A
B4X:If IsDevTool("B4A") Then Dim pLocalPhone As Phone pLocalPhone.HideKeyboard(Activity) Else 'Why does this generate an error when compiled using B4A. Isn't IsDevTool equivalent to conditional compile Garbage text End If
Sub Test()
Dim TimeComponents(2) As String
TimeComponents(0) = "0"
TimeComponents(1) = "1"
TimeComponents(2) = "2"
'This compiles with b4A, doesn't generates an error with B4i
TimeComponents(0) = TimeComponents(0) Mod 12
'This code compiles with Both
Dim iComponent0 As Int = TimeComponents(0)
iComponent0 = iComponent0 Mod 12
End Sub
Mod Operation B4A vs B4i.
Not sure If I am doing something wrong, but to my understanding this should work
That was also obvious in the above and that's why I tried that code to make sure that was the case.The reason the second block of code works is because TimeComponents(0) is explicity converted to an Int when stored in iComponent0. And no math conflict computing modulus on a number.