[twsocket] TIpFtp: suspicious code and other
TCustomFtpCli.DoGetAsync contains lines to open file stream. But as far as I see exactly the same is implemented in CreateLocalFileStream method. Maybe it would be better to call it instead? I would also like to know how can I attach to the moment of creating file to write. I want to set Hidden attr to files being downloaded and clear it on download finish, but I don't know where to place it. I could make OpenFileStream virtual but it's used in other places too - so it's hard to distinguish one case from another. Currently I see only one way: check OpenMode in OpenFileStream to determine whether the file is being opened for writing or not. Maybe you've got better ideas? -- Anton -- 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] TIpFtp: suspicious code and other
Anton Sviridov wrote: I would also like to know how can I attach to the moment of creating file to write. I want to set Hidden attr to files being downloaded and clear it on download finish, but I don't know where to place it. I could make OpenFileStream virtual but it's used in other places too - so it's hard to distinguish one case from another. Currently I see only one way: check OpenMode in OpenFileStream to determine whether the file is being opened for writing or not. Maybe you've got better ideas? There's property TFtpClient.LocalStream. See button Transmit using a stream in OverbyteIcsFtpTst demo. -- Arno Garrels -- 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] Problems sending multiple E-Mails
Hi, I got now the message SMTP component not connected after sending ca. 380 Mails. Where can I handle the connection? Because I do an smtp.connect on every mail?! Best regards, Stefan 2010/7/7 Arno Garrels arno.garr...@gmx.de: Stefan Göppert wrote: What do you mean with ...post a custom message and from its handler call sendMail. ? For example (untested): const WM_SEND_DELAYED = WM_USER + 1; [..] type TForm1 = class(TForm) protected procedure WmSendMailDelayed(var Msg: TMessage); message WM_SEND_DELAYED; [..] implemtation procedure TForm1.WmSendMailDelayed(var Msg: TMessage); begin if Msg.WParam -1 then sendMail else ShowMessage('Done'); end; Use it like: PostMessage(Form1.Handle, WM_SEND_DELAYED, whereIam, 0); -- Arno Garrels -- 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 -- 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] Problems sending multiple E-Mails
Hello Stefan, I got now the message SMTP component not connected after sending ca. 380 Mails. Where can I handle the connection? Because I do an smtp.connect on every mail?! Most likely you hit some server-side limit. In OnRequestDone check for errors (Error = 0) and property Connected as well and do whatsoever is needed if something went wrong. The demos often do not include full error handling in order to keep them small. -- Arno Garrels -- 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