Re: how can I tell if a tstringlist.savetofile has worked?




Verily, on za 28 mei 2005 04:57:45a, PeterV wrote in
comp.lang.pascal.delphi.misc
[news:4297de28$1@xxxxxxxxxxxxxxxxxxxxx]:

> It appears to not provide a return value. I could do an If
> fileexists() afterwards, but a return value would be more elegant.
>
>
>

try
MyStringList.SaveToFile( AFileName );
ShowMessage('It Worked!);
except
ShowMessage( 'Damn!:' + SysErrorMessage(GetLastError) );
end



--
Dirk.
No trees were killed in the creation of this message;
however, many electrons were terribly inconvenienced.
http://users.pandora.be/dirk.claessens2
.



Relevant Pages