What is the logic behind the DoneEvent? (wodFtpDLX / wodFtpDLX.NET)
I'm using FtpDLX.Net and just like the other WOD controls I use I love it. It is a vast improvement over the last FTP control I had.
That said, I'm a but puzzled by the use of the DoneEvent that is called for multiple methods such as LisrDir, PutFile, GetFile and so on. It seems to be counter-productive. For example:
I want to issue a
ftp1.MakeDir(path)
ftp1.RemotePath = path
ftp1.PutFile(LocalPath, RemotePath)
in that order. The problem is that as soon as the ftp1.MakeDir is issued it immediately tries to issue the ftp1.RemotePath and then the ftp1.PutFile, all before MakeDir is completed. Now, I know that after I issue the MakeDir I'm supposed to wait for the DoneEvent to fire before issuing the RemotePath but I have no idea how to "pause" execution until the DoneEvent fires. What I end up with is having to put RemotePath and PutFile in the DoneEvent as well as for the ListDir and so on.
Surely there is a better way to do this. I wish these methods were synchronous so that when one is issued the program would wait for it to complete before proceeding.
Any suggestions?
Complete thread:
- What is the logic behind the DoneEvent? - tonym, 2015-10-06, 06:17
- What is the logic behind the DoneEvent? - Jasmine, 2015-10-06, 08:21