 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Nelson Chui Guest
|
Posted: Fri Feb 20, 2004 1:38 am Post subject: How to suspend Socket Message Dialog ? |
|
|
Hi,
I have wrote a 7x24 real-time program and upload some text file to a FTP
server for a period of time (Timer1). But, sometimes TIdFTP ( Indy
ver9.0.14 ) will raise the some socket errors (e.g. Resolving hostname
error, Connection timeout and etc.) and I allow the program that will
ignore error(s) and upload the text file later.
procedure TForm1.Timer1Timer(Sender: TObject);
begin
try
with idFTP1 do begin
if not connected then connect;
if connected then begin
Put(cFileName, 'data.txt');
Disconnect;
DisconnectSocket;
end;
end;
except
// Do nothing and ignore.
end;
end;
But, the program, TIdFTP, will still raise the Socket error message
dialog box. Would you give me some advice to suspend such dialog box ?
THX.
Regards,
Nelson.
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Fri Feb 20, 2004 3:58 am Post subject: Re: How to suspend Socket Message Dialog ? |
|
|
"Nelson Chui" <nelson_chui (AT) yahoo (DOT) com> wrote
| Quote: | Disconnect;
DisconnectSocket;
|
You do not need to call both methods. Just call Disconnect only. It will
call DisconnectSocket() internally.
| Quote: | But, the program, TIdFTP, will still raise the Socket error
message dialog box.
|
No, it will not. The code you have shown is fine. The only way such a
dialog could appear is if you are running the program inside the IDE
debugger and are actually seeing the debugger's popup dialog, which is
perfectly normal behavior.
Gambit
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|