B4J Question TableView Crash

Swissmade

Well-Known Member
Licensed User
Longtime User
Hi All,

Have a little problem here.
I have a form with a Tableview when I fill the Tableview I get my records.
After the Table View is filled I like to move to the First Row.
Now we get the problem.
I use tblView.selectedrow = 0
When I do this in Debug mode, there is no problem.
In the release mode the tableview Crash.:(
I try something else.
Place a button on the Form and click this. The only command I use is tblView.selectedrow = 0
Here I get the same Problem.

Somebody any Idea??
 

Swissmade

Well-Known Member
Licensed User
Longtime User
Found the Problem but its still strange.:confused:
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Could you explain the solution/ cause, that way if someone else has the same problem, it will give them a hint where to look.
 
Upvote 0

Swissmade

Well-Known Member
Licensed User
Longtime User
The solution is discussed here already I have seen somewhere.
The Problem was I used the SUB
Sub tblView_SelectedRowChanged(Index As Int, Row() As Object)
dim lbl as Label = Row(1) 'This is a AnchorPane and can not be converted to a Label
End Sub
Strange it has to be a value
Solution = to define a Anchorpane and the get the Node.
Dim AP as AnchorPane = Row(1)
Dim lbl as Label = ap.getnode(1)

Hope this helps.

Cheers,
Swissmade
 
Upvote 0
Top