CHILKAT

This forum is for eXpress++ general support.
Post Reply
Message
Author
MIGUELON
Posts: 135
Joined: Wed Feb 10, 2010 10:55 am

CHILKAT

#1 Post by MIGUELON »

Hi Tom, you can't imagine the gift you gave me by running the Childkat bookstore.
It's great and solves a lot of problems for me.
It is also very easy to implement, you just have to remove the THEN and replace the period with:
I just haven't been able to implement "Progress Event Callbacks" yet, could you post an example?
Thank you so much

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: CHILKAT

#2 Post by Tom »

Good to hear this great library works well for you, but I don't understand your request. Could you show it or be a little more precise? What are you talking about?
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

MIGUELON
Posts: 135
Joined: Wed Feb 10, 2010 10:55 am

Re: CHILKAT

#3 Post by MIGUELON »

Tom I want to see a progress bar when I FTP a file or when I ZIP it

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: CHILKAT

#4 Post by Tom »

This is what the chilkat docs say:
async_ax.png
async_ax.png (18.38 KiB) Viewed 2549 times
I didn't try to process background callbacks. My SFTP client built with chilkat shows a dialog with a progress bar (marquee, no percentage) while the upload goes on. The progress bar is removed in the moment the upload method finishes.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

MIGUELON
Posts: 135
Joined: Wed Feb 10, 2010 10:55 am

Re: CHILKAT

#5 Post by MIGUELON »

Ok, from what I understand what you do is a dummy status bar that disappears when the process ends.
Thank you again Tom

Piotr D
Posts: 129
Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland

Re: CHILKAT

#6 Post by Piotr D »

Hi Miguelon,
you can try something like this:

zip:=CreateObject("Chilkat_9_5_0.Zip")
zip:NewZip(cArcFile)

zip:PasswordProtect:=1
zip:EncryptPassword:=m_sigha()
* capture callback slots
zip:=zip:dynamicCast("ActiveXObject")

FOR i := 1 TO LEN(aFileList)
IF oPrzerwanoSignal:wait(1) // waiting for user's cancel
M_ABORT := .T.
RETURN(.F.)
ENDIF
M_Licznik := 0
* oPostep1 is a progressbar
oPostep1:current:=1
M_Plik := ALLTRIM(aFileList)
M_Plik := SubStr(M_Plik,RAt("\",M_Plik)+1)
* we set the callback slot PercentDone of the ZIP object to pass the information
* about the advancement of subsequent methods to the file packing progress bar
zip:PercentDone:={|a|oPostep1:current:=a}

* adds a file to an object - this doesn't pack it yet
IF zip:AppendFiles(ALLTRIM(aFileList),1)=1
IF i=1
* I pack the first file into a defined file and close it
IF zip:WriteZipAndClose()=0
EXIT
ENDIF
* I create a new object so that it always contains only one packaged file
zip:NewZip(cArcFile)
ELSE
* subsequent files are appended to the existing ZIP file
IF zip:QuickAppend(cArcFile)=0
EXIT
ELSE
IF i<LEN(aFileList)
* I create a new object so that it always contains only one packaged file
zip:NewZip(cArcFile)
ELSE
lReturn:=.T.
EXIT
ENDIF
ENDIF
ENDIF
ENDIF
NEXT

Regards
Piotr

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: CHILKAT

#7 Post by Tom »

Cool.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Post Reply