I created a panel (pnlbrgbrg) with a "intersections" layout for one of my activities but get an error saying the object must be initialized. I am not clear on what is meant. I followed Klaus' example and could not see any separate code for that. Here is my code so far:
The panel will become visible with some other code in the 'embed' activity. The docs say that 'initialize' is one of 'panel's' members with a parameter of 'eventname' but don't know what that refers to. I keep going back to the 'twopanel' activity example by Klaus for my guide. Thanks for any advice and help. This has to be pretty simple.
Jim Schuchert
B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim txtFrom As EditText
Dim txtTo As EditText
Dim txtBearing As EditText
Dim txtDistance As EditText
Dim txtDescriptor As EditText
Dim txtDisplay As EditText
Dim btnOK As Button
Dim btnMenu As Button
Dim btnReset As Button
Dim crd(4)
Dim intq
Dim firstpt,secondpt
Dim pnlbrgbrg As Panel '[color=red]I thought this initialized it[/color]
Dim btnPanelOK As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
activity.LoadLayout ("embed")
pnlbrgbrg.LoadLayout("intersections") [color=red]this line throws the error[/color]
pnlbrgbrg.Visible=False
End Sub
The panel will become visible with some other code in the 'embed' activity. The docs say that 'initialize' is one of 'panel's' members with a parameter of 'eventname' but don't know what that refers to. I keep going back to the 'twopanel' activity example by Klaus for my guide. Thanks for any advice and help. This has to be pretty simple.
Jim Schuchert