(AutoIt) Transition from Zip.GetEntryByID to Zip.EntryById
Provides instructions for replacing deprecated GetEntryByID method calls with EntryById. Note: This example requires Chilkat v11.0.0 or greater.
$oZip = ObjCreate("Chilkat.Zip")
; ...
; ...
Local $id = 123
; ------------------------------------------------------------------------
; The GetEntryByID method is deprecated:
Local $oEntryObj = $oZip.GetEntryByID($id)
If ($oZip.LastMethodSuccess = False) Then
ConsoleWrite($oZip.LastErrorText & @CRLF)
Exit
EndIf
; ...
; ...
; ------------------------------------------------------------------------
; Do the equivalent using EntryById.
; Your application creates a new, empty ZipEntry object which is passed
; in the last argument and filled upon success.
$oZe = ObjCreate("Chilkat.ZipEntry")
Local $bSuccess = $oZip.EntryById($id,$oZe)
If ($bSuccess = False) Then
ConsoleWrite($oZip.LastErrorText & @CRLF)
Exit
EndIf
|