Archived Forum Post

Index of archived forum posts

Question:

Visual foxpro Abort event

Jun 21 '15 at 13:56

Hi Guys..,

I'm new to the software any just trying to get my head around it...

I've searched for a few hours on the forums and have been experimenting..

The help files seem to refer to a previous version of the software so I'm getting a little frustrated, but working my way through it.

Chilkat version: 9.5.0 Visual foxpro 9

I have created a class that implements the DLL as follows (as shown - sort off - in the docs) IMPLEMENTS _IChilkatEvents IN "libschilkatax-9.5.0-win32.dll"

I've created the procedures:-

    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 ENDPROC

I've created an instance of the class oCtrl...

So how do I abort the event... what property do I set to let chilkat know to abort?

Hope you can help.

Thanks in advance

Steve


Answer

Sorted it :)

Me again being silly...

Added a variable llAbort = 0

When the abort button is pressed it sets the llabort to 1.

And added the IF llabort = 1 to the procedure

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