Hi I have an App with 18 pages all of which are loaded using the following code (this is only showing page 6)
The code below is in B4XMainPage
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
The code for loading a page is
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
and it fails with the following error
Target is null. Method called: _initialize:::
I have stepped through the code and the page is being initialized
What is going on?
OK now sorted the flexgrid on the page was causing a problem I replaced it and now all is working
			
			The code below is in B4XMainPage
			
				Page load:
			
		
		
		Sub Class_Globals
     Public Page6 As CompanyList
End Sub
Public Sub Initialize
'    B4XPages.GetManager.LogEvents = True
    Page6.Initialize
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("Login")
    B4XPages.AddPage("CompanyList", Page6)
   
End SubThe code for loading a page is
			
				Load Page 6:
			
		
		
		Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    'load the layout to Root
    Root.LoadLayout("ListOfCompanies")
    s_Menu = Array As String("New Company/Location", "New User",  "Remove User", "Group Emails", "Password")
End Suband it fails with the following error
Target is null. Method called: _initialize:::
I have stepped through the code and the page is being initialized
What is going on?
OK now sorted the flexgrid on the page was causing a problem I replaced it and now all is working
			
				Last edited: 
			
		
	
								
								
									
	
								
							
							 
				 
 
		 
 
		 
 
		 
 
		 
 
		