I copied code from one of the example programs ('editable B4XTable' I think) and made some changes.
Here is my code that is getting the error and I have not been able to figure out what I have done wrong. Most of the changes were just changing B4XTable1 to B4XTableM. I have attached the log file and I can furnish the full source and test data if it is needed. The error doesnt show up on the screen like most do and just stops the execution of the app but does show it as '
Error occurred on line: 118 - java.lang.NullPointerException in the log file
Here is my code that is getting the error and I have not been able to figure out what I have done wrong. Most of the changes were just changing B4XTable1 to B4XTableM. I have attached the log file and I can furnish the full source and test data if it is needed. The error doesnt show up on the screen like most do and just stops the execution of the app but does show it as '
Error occurred on line: 118 - java.lang.NullPointerException in the log file
B4X:
Sub B4XTableM_CellClicked (ColumnId As String, RowId As Long)
Dim column As B4XTableColumn = B4XTableM.GetColumn(ColumnId)
Dim value As String = B4XTableM.GetRow(RowId).Get(ColumnId)
InputTemplate.Text = value
InputTemplate.lblTitle.Text = column.Id 'line 118 error column.Id = 'description' InputTemplate is all null's except for Text which is = 'AT&T'
Wait For (Dialog.ShowTemplate(InputTemplate, "OK", "", "CANCEL")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
B4XTableM.sql1.ExecNonQuery2($"UPDATE data SET ${column.SQLID} = ? WHERE rowid = ?"$, Array As String(InputTemplate.Text, RowId))
B4XTableM.Refresh
End If
End Sub
Attachments
Last edited: