Archived Forum Post

Index of archived forum posts

Question:

Missing events for ftp2 and zip

Mar 20 '14 at 21:14

Hi there, this is another question,

I've taken over a software project that uses the Chilkat components. We were using version 9.4.1.42 having upgraded from an earlier one, and now I've upgraded to 9.5. I had trouble with half the ftp2 events not firing now it's just the zip ones. The software is a vb.net windows forms application targeting the .net 4.0 framework.

The application had the chilkat components declared with events. The handlers declared were:

zip.ToBeZippedEventArgs
zip.OnWriteZipPercentDone
ftp2.OnAbortCheck
ftp2.OnFtpPercentDone
ftp2.OnDownloadRate 
ftp2.OnUploadRate
ftp2.OnVerifyDownloadDir
ftp2.OnBeginDownloadFile
ftp2.OnBeginUploadFile
ftp2.OnEndUploadFile

Now after the upgrading again and changing names to match new convention, the ftp2 ones work:

ftp2.OnAbortCheck
ftp2.OnBeginDownloadFile
ftp2.OnBeginUploadFile
ftp2.OnPercentDone
ftp2.OnVerifyDownloadDir
ftp2.OnDownloadRate
ftp2.OnUploadRate
ftp2.OnEndDownloadFile
ftp2.OnEndUploadFile

The zip ones however don't seem to fire at all:

zip.OnToBeZipped
zip.OnPercentDone

I'm declaring the components like this:

Private WithEvents ftp2 As New Chilkat.Ftp2()
Private WithEvents zip As New Chilkat.Zip()

And setting up the handlers like this:

Private Sub zip_OnPercentDone(ByVal sender As Object, ByVal args As Chilkat.PercentDoneEventArgs) Handles zip.OnPercentDone
    intPercentDone = args.PercentDone
    UpdateStatus(String.Format("{0}% Backing up {1}", intPercentDone, strCurrentFile))
End Sub

Private Sub zip_OnToBeZipped(ByVal sender As Object, ByVal args As Chilkat.ToBeZippedEventArgs) Handles zip.OnToBeZipped
    strCurrentFile = args.FileName
End Sub

I've got this set:

ftp2.EnableEvents = True

But I've read that this isn't necessary any more.

The events are all present in the visual studio object browser and the build works with no warnings or complaints. I have no way of telling if these are firing inside Chilkat.

How do I either enable these events or troubleshoot??

Regards
Damien


Answer

I am having the same problem with sftp. I already created a post about it. I can not get onPercentDone or OnUploadRate to fire.


Answer

I removed the Chilkat library, did a clean then re-added it. Did another clean and build and the last events are now working. Thanks.