Autor Beitrag
Gabberman
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: So 18.09.05 13:50 
Hy @ all. Ich wollte mit einem Button eine neue Datei erzeugen und in diese etwas reinschreiben,#
Hier erstmal der Quelltext:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TForm1.Button1Click(Sender: TObject);
var

  F: TextFile;

begin
    AssignFile(F, 'datei.txt');
    Reset(F);
    Writeln(F, 'test');
    CloseFile(F);
  end;



da kommt ein Exeptionfehler!!!
Was mach ich da falsch??? Am besten wäre es wenn ich eine total neue Datei erstellen könnte.
Bitte helft mir!!!!!!!
mfG

Gabberman

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt.
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: So 18.09.05 13:53 
reset öffnet eine vorhandene datei zum lesen.
mit rewrite erstellst du eine neue.

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Gabberman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: So 18.09.05 13:56 
DANKE!!! Es funktionier!!!!!!!!!!!!!