B4J Question TableView1

GiulioVale

Active Member
Licensed User
Longtime User
Hi,
with
B4X:
Sub TableView1_SelectedRowChanged(Index As Int, Row() As Object)  
    Label1.Text =Row(1)
End Sub

when I call two times
B4X:
TableView1.Items.Clear

I get an error like
B4X:
main._tableview1_selectedrowchanged (java line: 343)
java.lang.NullPointerException

There is no problemi if the Sub is empty

Any help?

Thanks
 

Harris

Expert
Licensed User
Longtime User
if tableview1.size > 0 then

' or something to that effect
' hard to say without actual debug code... what is line 343 (which is java - need B4X debug line...?

End if

Lacking info...
 
Upvote 0

GiulioVale

Active Member
Licensed User
Longtime User
if tableview1.size > 0 then

' or something to that effect
' hard to say without actual debug code... what is line 343 (which is java - need B4X debug line...?

End if

Lacking info...
Thank for reply.
Work with test of Index for value different from -1
 
Upvote 0
Top