I'm trying to update text of a label in a layout created with the Designer. I need to do this in code with an array. I can do this with a simple variable but not with an array. I tried the following without success. It doesn't generate any errors but the text never displays. I have done this before in a layout generated in code but not with a Designer layout.
B4X:
Sub Globals
Dim ThisField(10) as Label
...
' Sports is the name of the label in the layout
Activity.LoadLayout("MyLayout")
ThisField(1).Initialize("Sports")
ThisField(1).Text = "Baseball"