Sub Process_Globals
End Sub
Sub Globals
Dim Buttons() As Button
Dim b1 As Button
Dim b2 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout ("1.bal")
Buttons = Array As Button(b1, b2)
End Sub
Sub Buttons_Click
Dim btn As Button
btn = Sender
Activity.Title = "Button " & btn.Tag & " clicked"
End Sub
I made two buttons b1 and b2 in designer.
It doesn't work. Why ?
When buttons are initialized in code NOT in designer all works fine.
The Event Name property is in the designer when you add the buttons.
The button array is not initialized, it is refering to the same Event Name as the buttons in the designer.