OnConnect Event no longer fires - WeOnlyDo Discussion board

OnConnect Event no longer fires (wodFTPServer)

by Bob Perkins, Wednesday, September 12, 2012, 21:10 (4234 days ago)

I have the following code:

FTPSite := TwosSFTP.Create(nil);
FTPSite.OnConnected := Self.FTPSiteConnected;
FTPSite.OnDone := Self.FTPSiteDone;
FTPSIte.Hostname := FTPServer;
FTPSite.login := UserName;
FTPSite.password := Password;
FTPSite.Authentication := authPassword;
FTPSite.ProxyType := proxyNone;
FTPSite.RemotePath := ServerFile;
FTPSite.LocalPath := LocalPath;
FTPSite.Connect;

And the OnConnected event does not get executed. I few months ago this code worked just fine. In fact my boss using it in another program and it works fine. Now in this program it has decided not fire the routine.

Any insight into what I've done wrong is greatly appreciated.

Re: OnConnect Event no longer fires

by wodDamir, Wednesday, September 12, 2012, 21:19 (4234 days ago) @ Bob Perkins

Bob,

Can you try Connect1 method instead? Is it available? Usually Delphi wrapper creates it instead of Connect.

Regards,
Damba

Re: OnConnect Event no longer fires

by bob perkins, Thursday, September 13, 2012, 15:33 (4233 days ago) @ wodDamir

Bob,

Can you try Connect1 method instead? Is it available? Usually Delphi wrapper creates it instead of Connect.

Regards,
Damba


There is no connect1 method in the interface file, only the connect.

Re: OnConnect Event no longer fires

by wodDamir, Thursday, September 13, 2012, 15:59 (4233 days ago) @ bob perkins

Bob,

Can you send us the sample project to techsupport@weonlydo.com? I'd like to try your project.

If I start same project form scratch here it works fine.

Regards,
Damba

Re: OnConnect Event no longer fires

by bob perkins, Thursday, September 13, 2012, 23:47 (4233 days ago) @ wodDamir

Bob,

Can you send us the sample project to techsupport@weonlydo.com? I'd like to try your project.

If I start same project form scratch here it works fine.

Regards,
Damba

My program file e-mail got rejected by your server. I've been playing with the control now for two days. Today I watched the OnConnect event sometimes fire off and sometimes not. I've had to change my code to handle if that works or when that doesn't I go into a brute force sending method where I have a serious of loops waiting ofr state changes in the control. It is not pretty and I neither are the comments explaining why it is done in such a manner. Hopefully I've covered all my bases and I can push the files out.

Re: OnConnect Event no longer fires

by woddrazen, Thursday, September 13, 2012, 23:57 (4233 days ago) @ bob perkins

Bob,


Did you maybe set Blocking Property to True inside your code? If you didn't Connected Event should be fired when you run Connect Method.

If you have issue is there any chance we can duplicate it on our side? Which email address you are using?


Drazen

Re: OnConnect Event no longer fires

by Bob Perkins, Friday, September 14, 2012, 13:55 (4232 days ago) @ woddrazen

Bob,


Did you maybe set Blocking Property to True inside your code? If you didn't Connected Event should be fired when you run Connect Method.

If you have issue is there any chance we can duplicate it on our side? Which email address you are using?


Drazen

I have not intentionally set blocking property. I instansiate an instance of the class, set the credentials and other pertinant properties to send and then connect.

I sent my example to the e-mail address listed in the previous posting. I cut and pasted to avoid typos but I will try again.

Re: OnConnect Event no longer fires

by woddrazen, Friday, September 14, 2012, 13:57 (4232 days ago) @ Bob Perkins

Bob,


You can contact us here also:
http://www.weonlydo.com/index.asp?helpdesk=1


Drazen