login about faq

PercentDone return a status message not a value...

So when I check the value of nProgress it is "SocketConnect" and other messages.

Can anyone help or is this a bug?

Here is the code.

*Definition of control class:
DEFINE CLASS Ctrl as Session OLEPUBLIC

*The IMPLEMENTS... line below is what makes Foxpro take control over the SendPercentDone, ReadPercentDone and AbortCheck
*NOTE - This path part of the IMPLEMENTS must point to the dll, so locate and correct it before you are using the program.
IMPLEMENTS _IChilkatEvents IN "libs\chilkatax-9.5.0-win32.dll"

nProgress = 0
llAbort = 0

PROCEDURE Init
ENDPROC

PROCEDURE _IChilkatEvents_PercentDone(percentDone AS Number, abort AS Number) AS VOID;
    HELPSTRING "method SendPercentDone"
    * add user code here
    This.nProgress = percentDone
    ACTIVATE SCREEN
    @0,0 say "Percent Done: " + TRANSFORM(This.nProgress)
    DOEVENTS
ENDPROC

PROCEDURE _IChilkatEvents_ProgressInfo(percentDone AS Number, abort AS Number) AS VOID; HELPSTRING "method ReadPercentDone" * add user code here This.nProgress = percentDone @0,0 say "Progress: " + TRANSFORM(This.nProgress) DOEVENTS ENDPROC

PROCEDURE _IChilkatEvents_AbortCheck(abort AS Number) AS VOID; HELPSTRING "method AbortCheck" * add user code here IF THIS.llAbort = 1 abort = 1 ENDIF ENDPROC

asked Jun 20 '15 at 09:35

Albany's gravatar image

Albany
111


Sorted it...

My fault... getting too caught up with it failing and not looking at the code. I was using the same variable progressDone in the progressInfo procedure.

Updated my code to...

*Definition of control class:
DEFINE CLASS Ctrl as Session OLEPUBLIC

*The IMPLEMENTS... line below is what makes Foxpro take control over the SendPercentDone, ReadPercentDone and AbortCheck
*NOTE - This path part of the IMPLEMENTS must point to the dll, so locate and correct it before you are using the program.
IMPLEMENTS _IChilkatEvents IN "libs\chilkatax-9.5.0-win32.dll"

nProgress = 0
cProgress = ""
llAbort = 0

PROCEDURE Init
ENDPROC

PROCEDURE _IChilkatEvents_PercentDone(percentDone AS Number, abort AS Number) AS VOID;
    HELPSTRING "method SendPercentDone"
    * add user code here
    This.nProgress = percentDone
    ACTIVATE SCREEN
    @0,0 say "Percent Done: " + TRANSFORM(This.nProgress)
    DOEVENTS
ENDPROC

PROCEDURE _IChilkatEvents_ProgressInfo(progressInfo AS Number, abort AS Number) AS VOID; HELPSTRING "method ReadPercentDone" * add user code here This.cProgress = progressInfo @0,0 say "Progress: " + TRANSFORM(This.nProgress) DOEVENTS ENDPROC

PROCEDURE _IChilkatEvents_AbortCheck(abort AS Number) AS VOID; HELPSTRING "method AbortCheck" * add user code here IF THIS.llAbort = 1 abort = 1 ENDIF ENDPROC

ENDDEFINE

link

answered Jun 20 '15 at 09:44

Albany's gravatar image

Albany
111

I have question to the IOMPLEMENT. I found out the new style to write the implements with the new single dll of chilkat. BUT: how connect it with the eventhandler to VFP?

I have the implemnt like you, same name...and i wrote in VFP :

loFtp = CreateObject('Chilkat_9_5_0.Ftp2') ... loCtrl = CREATEOBJECT("ChilkatCtrl") && Create controlling object:

EVENTHANDLER(toFTP, loCtrl)

but EVENTHANDLER return .F. and nothing is fired in the events.. Any sample code for me would be great beacuse chilkat has nothing there for the new version (i coundln't find)

link

answered Apr 09 at 02:16

Flashlight's gravatar image

Flashlight
1

I generated .prg samples/templates for each of the Chilkat ActiveX classes that have events. See http://www.chilkatforum.com/questions/10182/chilkat-foxpro-events-prg-event-classes

link

answered Apr 11 at 13:04

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×18
×10

Asked: Jun 20 '15 at 09:35

Seen: 895 times

Last updated: Apr 11 at 13:04

powered by OSQA