Autor Beitrag
dekoepke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 28

Win XP, Suse Linux 11.1
Delphi 5 Prof. Delphi 7 Enterprise Edition
BeitragVerfasst: Sa 14.02.09 12:43 
Hallo Leute,
ich habe mal wieder ein Problem mit einem meiner Programme.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
//MainForm
procedure TMain.FormShow(Sender: TObject);
begin
Start.Download;
end;

//StartForm

var
  Start: TStart;
  List:TStringList;

implementation

Uses Unit1;

{$R *.dfm}

Procedure TStart.Download;
begin
List.Create;
List.Text:= IDHttp1.Get('http://www.happy-pcs.de/shop/file1.data');
List.SaveToFile(ExtractFilePath(ParamStr(0))+'\file1.data');
end;

Ich bekomme dabei eine Zugriffverletzung.. Warum :?: :roll:

Danke.
MfG
dekoepke


Moderiert von user profile iconNarses: Topic aus VCL (Visual Component Library) verschoben am Sa 14.02.2009 um 14:27
Einloggen, um Attachments anzusehen!
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Sa 14.02.09 12:47 
Der Fehler liegt hier:
user profile icondekoepke hat folgendes geschrieben Zum zitierten Posting springen:
ausblenden Delphi-Quelltext
1:
List.Create;					


Man erstellt Objekte nämlich so:
ausblenden Delphi-Quelltext
1:
List:=TStringList.Create;					


Außerdem solltest du am Schluss die Liste wieder freigeben:
ausblenden Delphi-Quelltext
1:
List.Free;					

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
dekoepke Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 28

Win XP, Suse Linux 11.1
Delphi 5 Prof. Delphi 7 Enterprise Edition
BeitragVerfasst: Sa 14.02.09 13:29 
Stimmt^^ Danke.
Hatte ich vergessen.

MfG
dekoepke