The same code a few minutes earlier worked just fine. Now I get the error:
java.lang.RuntimeException: Object should first be initialized (Label).
There are NO controls in the layout.
Here is the offending code:
Sub Globals
DimlblSPOTS(81) AsLabel'Labels for the spots.
End Sub
Sub Activity_Create(FirstTime AsBoolean)
Activity.LoadLayout("mylayout")
Dim x AsInt
Dim y AsInt
For x = 1To10
For y = 0To70Step10
Dim l AsLabel
l.Initialize("lblSPOTS")
Activity.AddView(l,(((x*50)-50)),y*5,45,45)
Next
Next
End Sub
Sub lblSPOTS_Click
Dim c AsLabel
c = Sender
lblSPOTS(c.Tag).Color = Colors.green
End Sub
Any help would be appreciated. Thank you!
java.lang.RuntimeException: Object should first be initialized (Label).
There are NO controls in the layout.
Here is the offending code:
Sub Globals
DimlblSPOTS(81) AsLabel'Labels for the spots.
End Sub
Sub Activity_Create(FirstTime AsBoolean)
Activity.LoadLayout("mylayout")
Dim x AsInt
Dim y AsInt
For x = 1To10
For y = 0To70Step10
Dim l AsLabel
l.Initialize("lblSPOTS")
Activity.AddView(l,(((x*50)-50)),y*5,45,45)
Next
Next
End Sub
Sub lblSPOTS_Click
Dim c AsLabel
c = Sender
lblSPOTS(c.Tag).Color = Colors.green
End Sub
Any help would be appreciated. Thank you!