Once again I'm confused when working with an Erel tutorial (Dynamic Controls) and my B4A won't react like his B4J. In the following code B4A won't recognize a Form and I don't know how to either declare Form or find a B4A library which will allow Form. Please help.
Thanks
I get this message when running the IDE Debug.
B4A Version: 7.80
Parsing code. Error
Error parsing program.
Error description: Unknown type: form
Are you missing a library reference?
Error occurred on line: 4 (Main)
Private MainForm As Form
B4X:
Sub Process_Globals
Private MainForm As Form
Private Label1 As Label
End Sub
Sub Globals
Private Label1 As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
MainForm = Form1
MainForm.RootPane.LoadLayout("Dyno_Layout") 'Load the layout file
MainForm.Show
End Sub
Sub Button2_Click
Label1.Text = 2
End Sub
Sub Button1_Click
Label1.Text = 1
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
It's really important to remember that even though B4A, B4i and B4J looks very much each other on the surface, Erel has no intention to make it a single language for all platforms. Instead, each platform has its own ways of doing things, and the different B4*'s tend to follow the platform specific stuff quite closely.