![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Objective-C) Transition from Zip.FirstMatchingEntry to Zip.EntryMatchingProvides instructions for replacing deprecated FirstMatchingEntry method calls with EntryMatching. Note: This example requires Chilkat v11.0.0 or greater.
#import <CkoZip.h> #import <NSString.h> #import <CkoZipEntry.h> CkoZip *zip = [[CkoZip alloc] init]; // ... // ... NSString *pattern = @"*.txt"; // ------------------------------------------------------------------------ // The FirstMatchingEntry method is deprecated: CkoZipEntry *entryObj = [zip FirstMatchingEntry: pattern]; if (zip.LastMethodSuccess == NO) { NSLog(@"%@",zip.LastErrorText); return; } // ... // ... // ------------------------------------------------------------------------ // Do the equivalent using EntryMatching. // Your application creates a new, empty ZipEntry object which is passed // in the last argument and filled upon success. CkoZipEntry *ze = [[CkoZipEntry alloc] init]; BOOL success = [zip EntryMatching: pattern entry: ze]; if (success == NO) { NSLog(@"%@",zip.LastErrorText); return; } |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.