Re: [twsocket] Ftp component not ready

2012-10-21 Thread François Piette
 I'm running into a Ftp component not ready error. 
 What is the proper way to check for the component being ready in c++?

Use the OnRequestDone event.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket Digest, Vol 495, Issue 3

2012-10-21 Thread François Piette
 I can get the attachment file on the IPhone, but as a side effect I get
all 
 embedded images as attachments too at the bootom of the message.

Are you able to send such as message using a mail client such as Outlook ?
If yes, just have a look at how that message is formatted and change the
component to have the same formatting, and of course report the solution
here.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be




--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Ftp component not ready

2012-10-21 Thread Walter Bohlin

Francois,

I am use the OnRequestDone event as I always have, but this year I need 
to pull 10 files from 4 directories, and everything seems to have fallen 
apart. Always suspecting that I did something stupid, I rewrote the pull 
application as a standalone, and still get an occasional FTP component 
is not ready error.


Here is my code.. do you see any obvious errors?

void __fastcall TForm1::FtpAp1RequestDone(TObject *Sender, TFtpRequest 
RqType,

  WORD ErrCode)
{
int x;
if(Form1-FtpAp1-Connected==0  ftp_step15)
{
ftp_step=0;
Form1-FtpAp1-ConnectAsync();
return;
}
if(ftp_step15)
{
return;
}
ftp_step++;
switch(ftp_step)
{
case 1: Form1-FtpAp1-HostDirName=/NJ/dbready;
Form1-FtpAp1-CwdAsync();
break;
case 2: Form1-FtpAp1-HostFileName=NJ_Race.txt;
Form1-FtpAp1-LocalFileName=c:\\WNET\\NJ_Race.txt;
Form1-FtpAp1-GetAsync();
break;
case 3: Form1-FtpAp1-HostFileName=NJ_Candidate.txt;
Form1-FtpAp1-LocalFileName=c:\\WNET\\NJ_Candidate.txt;
Form1-FtpAp1-GetAsync();
break;
case 4: Form1-FtpAp1-HostFileName=NJ_Results.txt;
Form1-FtpAp1-LocalFileName=c:\\WNET\\NJ_Results.txt;
Form1-FtpAp1-GetAsync();
break;
case 5: Form1-FtpAp1-HostDirName=/ct/dbready;
Form1-FtpAp1-CwdAsync();
break;
case 6: Form1-FtpAp1-HostFileName=CT_Race.txt;
Form1-FtpAp1-LocalFileName=c:\\WNET\\CT_Race.txt;
Form1-FtpAp1-GetAsync();
break;
case 7: Form1-FtpAp1-HostFileName=CT_Candidate.txt;
Form1-FtpAp1-LocalFileName=c:\\WNET\\CT_Candidate.txt;
Form1-FtpAp1-GetAsync();
break;
case 8: Form1-FtpAp1-HostFileName=CT_Results.txt;
Form1-FtpAp1-LocalFileName=c:\\WNET\\CT_Results.txt;
Form1-FtpAp1-GetAsync();
break;
case 9: Form1-FtpAp1-HostDirName=/NY/dbready;
ftp_req_done==0;
Form1-FtpAp1-CwdAsync();
break;
case 10: Form1-FtpAp1-HostFileName=NY_Race.txt;
Form1-FtpAp1-LocalFileName=c:\\WNET\\NY_Race.txt;
Form1-FtpAp1-GetAsync();
break;
case 11: Form1-FtpAp1-HostFileName=NY_Candidate.txt;
Form1-FtpAp1-LocalFileName=c:\\WNET\\NY_Candidate.txt;
Form1-FtpAp1-GetAsync();
break;
case 12: Form1-FtpAp1-HostFileName=NY_Results.txt;
Form1-FtpAp1-LocalFileName=c:\\WNET\\NY_Results.txt;
Form1-FtpAp1-GetAsync();
break;
case 13:Form1-FtpAp1-HostDirName=/Pres_Reports/dbready;
ftp_req_done==0;
Form1-FtpAp1-CwdAsync();
break;
case 14:Form1-FtpAp1-HostFileName=pres_electoral.txt;
Form1-FtpAp1-LocalFileName=c:\\WNET\\pres_electoral.txt;
Form1-FtpAp1-GetAsync();
break;
case 15:Form1-FtpAp1-QuitAsync();
secs_since=0;
Form1-SecsSince-Color=clGreen;
Form1-SecsSince-Font-Color=clWhite;
Form1-UDPsocket-SendLine(APUpdate\r\n);
break;
}
}




On 10/21/2012 5:25 AM, François Piette wrote:

I'm running into a Ftp component not ready error.
What is the proper way to check for the component being ready in c++?

Use the OnRequestDone event.




--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Ftp component not ready

2012-10-21 Thread Walter Bohlin

Francois,

I apologize. It appears my problem was due to a faulty router. Thanks 
for your help!


Walter


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be