Sample code for 30+ languages & platforms
Visual FoxPro

Transition from Zip.FirstMatchingEntry to Zip.EntryMatching

Provides instructions for replacing deprecated FirstMatchingEntry method calls with EntryMatching.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loZip
LOCAL lcPattern
LOCAL loEntryObj
LOCAL loZe

lnSuccess = 0

loZip = CreateObject('Chilkat.Zip')

* ...
* ...
lcPattern = "*.txt"

* ------------------------------------------------------------------------
* The FirstMatchingEntry method is deprecated:

loEntryObj = loZip.FirstMatchingEntry(lcPattern)
IF (loZip.LastMethodSuccess = 0) THEN
    ? loZip.LastErrorText
    RELEASE loZip
    CANCEL
ENDIF

* ...
* ...

RELEASE loEntryObj

* ------------------------------------------------------------------------
* Do the equivalent using EntryMatching.
* Your application creates a new, empty ZipEntry object which is passed 
* in the last argument and filled upon success.

loZe = CreateObject('Chilkat.ZipEntry')
lnSuccess = loZip.EntryMatching(lcPattern,loZe)
IF (lnSuccess = 0) THEN
    ? loZip.LastErrorText
    RELEASE loZip
    RELEASE loZe
    CANCEL
ENDIF

RELEASE loZip
RELEASE loZe