'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Type Ob(bt As Button)
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim b As Ob
Dim butt As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
' b.bt.Initialize("") 'fails here
' Activity.AddView(b.bt, 0, 0, 200, 100)
' Dim middleMan As Button
' middleMan = b.bt 'fails here
' middleMan.Initialize("")
' Activity.AddView(middleMan, 0, 0, 200, 100)
' butt.Initialize("") 'normal way works
' Activity.AddView(butt, 0, 0, 200, 100)
b.bt = InitButton 'works
Activity.AddView(b.bt, 0, 0, 200, 100)
End Sub
Sub InitButton() As Button
Dim bbb As Button
bbb.Initialize("")
Return bbb
End Sub