This update brings two new language features, recently added to B4J and B4i: IIf and As.
More information: https://www.b4x.com/android/forum/threads/b4j-v9-10-beta-is-available-for-download.132170/#content
Download link: https://www.b4x.com/android/files/beta.exe
More information: https://www.b4x.com/android/forum/threads/b4j-v9-10-beta-is-available-for-download.132170/#content
B4X:
Label1.Text = IIf(EditText1.Text <> "", EditText1.Text, "Please enter value")
Dim Buttons As List = Array(Button1, Button2, Button3, Button4, Button5)
Dim s As String = Buttons.Get(2).As(B4XView).Text
Buttons.Get(2).As(B4XView).Text = "abc"
Dim j As String = $"{
data: {
key1: value1,
complex_key2: {key: value2}
},
items: [0, 1, 2]
}"$
Dim parser As JSONParser
parser.Initialize(j)
Dim m As Map = parser.NextObject
Dim value1 As String = m.Get("data").As(Map).Get("key1")
Dim value2 As String = m.Get("data").As(Map).Get("complex_key2").As(Map).Get("key")
Download link: https://www.b4x.com/android/files/beta.exe