Dear all,
Good day, I'm a very fresh with the b4a.
Currently i tried to create a dictionary.
I'm making a words index for easier search, now having about 2000 words in one activity.
My code is over then 4000 row. causing b4a an error during compiling.
My question is :- from the attached code, how can i combine the code become as shorter,
for example i wanted to be like code under below. shorter code.
if malay.display.text = ("malay1", "malay2", "malay3", "malay4")
Startactivity("A")
Activity.finish
Else if malay.display text= ("malay8", "malay9", "malay10", "malay11")
Startactivity("b")
Activity.finish
end if
Please advice, thanks in advance
Good day, I'm a very fresh with the b4a.
Currently i tried to create a dictionary.
I'm making a words index for easier search, now having about 2000 words in one activity.
My code is over then 4000 row. causing b4a an error during compiling.
My question is :- from the attached code, how can i combine the code become as shorter,
for example i wanted to be like code under below. shorter code.
if malay.display.text = ("malay1", "malay2", "malay3", "malay4")
Startactivity("A")
Activity.finish
Else if malay.display text= ("malay8", "malay9", "malay10", "malay11")
Startactivity("b")
Activity.finish
end if
Please advice, thanks in advance
B4X:
Sub Imv1_Click
If MalayDisplay.Text = "malay1" Then
StartActivity("A")
Activity.finish
Else If MalayDisplay.Text = "malay2" Then
StartActivity("A")
Activity.finish
Else If MalayDisplay.Text = "malay3" Then
StartActivity("A")
Activity.finish
Else If MalayDisplay.Text = "malay4" Then
StartActivity("A")
Activity.finish
Else If MalayDisplay.Text = "malay8" Then
StartActivity("b")
Activity.finish
Else If MalayDisplay.Text = "malay9" Then
StartActivity("b")
Activity.finish
Else If MalayDisplay.Text = "malay10" Then
StartActivity("b")
Activity.finish
Else If MalayDisplay.Text = "malay11" Then
StartActivity("b")
Activity.finish
End If