[EMAIL PROTECTED] wrote on 30/05/2001 15:36:48:
>
>i am need of help with my project, i am trying to save the lines in my
>memo1 box to a text file can some one please help me out here.
Mark already beat me to the punch with the simplest answer, so I
thought I'd try to point out a few things instead...
>procedure TForm1.BitBtn1Click(Sender: TObject);
>var
> sav:textfile;
> dat:string;
>begin
> dat:='data.txt';
> assignfile(sav,dat);
Here you've opened the file 'data.txt' and have a textfile object named
'sav'...
> rewrite(sav);
> writeln(dat,memo1.lines.txt);
> close(dat);
..and in these last two lines you're passing the string instead of the
textfile object. You also mis-spelled the Text member, so the compiler
would have had much to complain about there. It might help to do:
WriteLn(sav, Memo1.Lines.Text);
Close(sav);
>end;
--
Corey Murtagh
The Electric Monk
"Quidquid latine dictum sit, altum viditur!"
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"