DataFlex
DataFlex
Transition from Zip.FirstMatchingEntry to Zip.EntryMatching
Provides instructions for replacing deprecated FirstMatchingEntry method calls with EntryMatching.Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Boolean iSuccess
Handle hoZip
String sPattern
Variant vEntryObj
Handle hoEntryObj
Variant vZe
Handle hoZe
String sTemp1
Boolean bTemp1
Move False To iSuccess
Get Create (RefClass(cComChilkatZip)) To hoZip
If (Not(IsComObjectCreated(hoZip))) Begin
Send CreateComObject of hoZip
End
// ...
// ...
Move "*.txt" To sPattern
// ------------------------------------------------------------------------
// The FirstMatchingEntry method is deprecated:
Get ComFirstMatchingEntry Of hoZip sPattern To vEntryObj
If (IsComObject(vEntryObj)) Begin
Get Create (RefClass(cComChilkatZipEntry)) To hoEntryObj
Set pvComObject Of hoEntryObj To vEntryObj
End
Get ComLastMethodSuccess Of hoZip To bTemp1
If (bTemp1 = False) Begin
Get ComLastErrorText Of hoZip To sTemp1
Showln sTemp1
Procedure_Return
End
// ...
// ...
Send Destroy of hoEntryObj
// ------------------------------------------------------------------------
// Do the equivalent using EntryMatching.
// Your application creates a new, empty ZipEntry object which is passed
// in the last argument and filled upon success.
Get Create (RefClass(cComChilkatZipEntry)) To hoZe
If (Not(IsComObjectCreated(hoZe))) Begin
Send CreateComObject of hoZe
End
Get pvComObject of hoZe to vZe
Get ComEntryMatching Of hoZip sPattern vZe To iSuccess
If (iSuccess = False) Begin
Get ComLastErrorText Of hoZip To sTemp1
Showln sTemp1
Procedure_Return
End
End_Procedure