If I uncomment line 19 (Line 45 in Main in my actual code), I get a error:
java.lang.RuntimeException: Object should first be initialized (View).
I have spent hours trying to figure out what the problem is.
It works in the code in the Table.zip file: https://www.b4x.com/android/forum/t...supports-tables-of-any-size.19254/#post110901
Project is attached.
Please help!
And Thank You In Advance!
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
			
			java.lang.RuntimeException: Object should first be initialized (View).
I have spent hours trying to figure out what the problem is.
It works in the code in the Table.zip file: https://www.b4x.com/android/forum/t...supports-tables-of-any-size.19254/#post110901
Project is attached.
Please help!
And Thank You In Advance!
			
				B4A Snippet:
			
		
		
		Sub Globals
    'These global variables will be redeclared each time the activity is created.
    Type Todo(ID As Short, Name As String, Status As Byte, Context As Byte, Category As Byte, Priority As Int, Note As String)
    Dim table1 As Table
    Dim Statuses(12,2) As String
    Dim Categories(40,2) As String
    Dim TodoList As List
    Dim HeaderRow(7) As String
    Dim Categories(40,2) As String
    Dim n As Notification = CreateNotification("Tap to Proceed.")
End Sub
Sub Activity_Create(FirstTime As Boolean)
    If table1.IsInitialized Then
        Activity.RemoveAllViews 'remove the current table
    End If
    table1.Initialize(Me, "Table1", 4) 'The last value here sets the number of columns in the table that shows on the screen.
    table1.AddToActivity(Activity, 0, 0, 100%x, 100%y)
    'table1.SetColumnsWidths(Array As Int(100dip, 30dip, 130dip, 100%x - 260dip))
   
    myMap.Initialize
    'Activity.AddMenuItem("Load Table", "LoadTable")
    'Activity.AddMenuItem("Save Table", "SaveTable")
    Activity.AddMenuItem("Allow Context Notification", "AllowContextNotification")
    Activity.AddMenuItem("Clear Context Notification", "ClearContextNotification")
    Activity.AddMenuItem("Exit Program", "ExitProgram")
   
    LoadArrays(File.DirAssets, "Todo List.xls")
    Notifier
End SubAttachments
			
				Last edited: 
			
		
	
								
								
									
	
								
							
							 
				 
 
		 
 
		 
						
					 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		