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

Reply via email to