Thema: Delphi Problem mit OpenDialog?

Einzelnen Beitrag anzeigen

AlexII

Registriert seit: 28. Apr 2008
1.717 Beiträge
 
FreePascal / Lazarus
 
#4

Re: Problem mit OpenDialog?

  Alt 22. Mai 2009, 17:17
Wenn ich die List2 freigebe stürzt das Programm beim Close ab

Delphi-Quellcode:
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
var i: Integer;
    s1,s2,s3,s4: String;
begin
List2.Clear;
//showmessage(listbox1.Items.Strings[0]);
for i:=0 to ListBox1.Count-1 do
begin
s1:=ListBox1.Items.Strings[i];
s2:=ListBox2.Items.Strings[i];
s3:=ListBox3.Items.Strings[i];
s4:=ListBox4.Items.Strings[i];

List2.Add('=' + s1 + '=' + s2 + '=' + s3 + '=' + s4 + '=');
end;
List2.SaveToFile(ExtractFilePath(ParamStr(0)) + '\Datei.txt');
end;
Oder muss ich die Liste hier neu createn?
  Mit Zitat antworten Zitat