Hi can anyone help me with this Please
when I click on Listview I get error Object should first be initialized (Label)
Lab_simi.Text = Cursor.GetString("simi")
when I click on Listview I get error Object should first be initialized (Label)
Lab_simi.Text = Cursor.GetString("simi")
B4X:
Sub read_to_listview
Dim Cursor As Cursor
ProgressDialogShow("Lés gagnaskrá")
Listview_sundstadir.Clear
Cursor = SQL.ExecQuery("select * from sundstadir_info")
For i = 0 To Cursor.RowCount - 1
Dim tt As personangsmnn
Cursor.Position = i
tt.nafn=Cursor.GetString("nafn")
tt.opidfra=Cursor.GetString("heimilisfang")
Listview_sundstadir.AddTwoLines2 (tt.nafn,tt.opidfra,tt)
Next
Cursor.Close
ProgressDialogHide
End Sub
Sub Listview_sundstadir_ItemClick (Position As Int, Value As Object)
Panmain.Visible=False
Pansundstadir.Visible=True
Dim Cursor As Cursor
Dim tt As personangsmnn
tt = Value
Cursor = SQL.ExecQuery("select * from sundstadir_info where nafn like '" & tt.nafn & "%' order by nafn;")
Cursor.Position = 0
labopid.Text = Cursor.GetString("sumar_opid")
Lab_heima.Text = Cursor.GetString("heimilisfang")
Lab_simi.Text = Cursor.GetString("simi") <----------- ERROR
Cursor.Close
ProgressDialogHide
End Sub