I take it that you are Returning "Nil" from General_bits.ReadConfFile('ljch');
if it fails to find/read the file
And I also assume you are destroying ("Free") the TStringList Temp before
setting it to "nil"...

HTH

Regards
Paul

____________________Reply Separator____________________
Subject:  [DUG]:  Aaaarrggghhh
Author:   [EMAIL PROTECTED]
Date:          24/07/2000 15:06



     I must be missing something really simple here.

     This is designed to test the ReadConfFile proc I've written - it should
     bring up a message dialog with the error "file not found" in it, but
     nothing
     comes up and the form closes as it normally would.

     procedure Tmenu.FormDestroy(Sender: TObject);
     var
       Temp: TStringList;
     begin
       Temp := TStringList.Create;
       Temp := General_bits.ReadConfFile('ljch');
       if Temp = Nil then
       begin
         MessageDlg(General_bits.Last_Error, mtError, [mbok], 0);
       end
       else begin
         Temp.SaveToFile('c:\windows\desktop\blah.txt');
       end;
     end;

     --

     Luke Pascoe
     Programming

     "Dr. Alex Comfort, author of 'The Joy of Sex' has died, after a
     series of strokes." -- From the Times, 28th March 2000.

     --


     ---------------------------------------------------------------------------
         New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                       Website: http://www.delphi.org.nz


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to