procedure TForm1.nextBTNClick(Sender: TObject);
var
Label1 : Tlabel;
I : Integer;
I1 : Integer;
S : String;
Tablica : array of String;
begin
Linie := memo.Lines.count;
S := memo.text;
SetLength(Tablica, linie);
begin
Celelbl.visible := false;
edit1.visible := false;
memo.visible := false;
memo1.visible := false;
prdlbl.visible := false;
wskazowkalbl.visible := false;
zdzlbl.visible := false;
end;
begin
Label1 := Tlabel.Create( Self );
Label1.Parent := Self;
Label1.Left := 10;
Label1.Top := 10;
Label1.Caption := 'Nr Nazwa X | Y Ilosc rozkazów Rozkaz';
Label1.Visible := True;
for I :=1 to linie do begin
// \/przypisanie do tablicy nazwy wioski
Tablica[I] := memo.lines[I];
I1 := (pos('|', Tablica[I]));
I1 := I1 - 5;
delete(Tablica[I], I1, 5);
label1.caption := inttostr(i1);
// \/ 1 2 3 liczenie wiosek takjakby
Label1 := Tlabel.Create( Self );
Label1.Parent := Self;
Label1.Left := 10;
Label1.Top := I*30;
Label1.Caption := inttostr(I);
Label1.Visible := True;
// \/ nazwy wiosek
Label1 := Tlabel.Create( Self );
Label1.Parent := Self;
Label1.Left := 70;
Label1.Top := I*30;
Label1.Caption := Tablica[I];
Label1.Visible := True;
end;
end;
niby działa ale jak klikne przycisk to wywala debuga
Project XXXXX.exe raised exception class eaccesviolation with message ' access violation at address 00403E92 in module 'XXXXXX.exe'. Read of address 00000018E. Procces stopped. Use sep or run to continue.
wie ktoś może o co chodzi?