Mam zdarzenie odczytywania stringów z ListView na SelectItem.
Kod wydaje mi się dobry, ale jak wybieram pozycje w ListView to wywala błąd
"Access violation at address 004363E8 in module 'Project1.exe'. Read of address 00000004."
procedure TForm2.ListView1SelectItem(Sender: TObject; Item: TListItem;
Selected: Boolean);
var
i:integer;
begin
Form2.Label1.Caption:=Form2.ListView1.Items[ListView1.Selected.Index].Caption;
Form2.Label2.Caption:=Form2.ListView1.Items[ListView1.Selected.Index].SubItems[0];
Form2.Label3.Caption:='Gracz: '+Form2.ListView1.Items[ListView1.Selected.Index].SubItems[1]+'';
Form2.Label5.Caption:='Z: '+Form1.Tablica[ListView1.Selected.Index][3]+' '+Form1.Tablica[ListView1.Selected.Index][5]+'';
Form2.Label4.Caption:='Cel: '+Form1.Tablica[ListView1.Selected.Index][4]+'';
Form2.Memo1.Text:=Form1.Tablica[ListView1.Selected.Index][1];
end;
Nie mam pojęcia co może być źle :/
Pomóżcie!