Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-29-2009, 09:44 AM   #1 (permalink)
Registered Member
 
Join Date: Apr 2009
Posts: 105
Default Searching a 3d NSMutableArray

Okay, I have an Book Object Class. That has Book.name and Book.id as extensions. Book.name being NSString. Which is what should be searchable and listed in UITableView.

Code:
NSMutableArray *matchingSymptomsArray = [[NSMutableArray alloc] initWithCapacity:50];

for(NSMutableArray *letterArray in DataArray){
        for(Book *bk in letterArray){ //Heres the ERROR
                NSLog(@"Uptil NEW");
                if([bk matchesSearchString:searchString]){
                        //I couldnt reach here, according to debugging and Logs//
                        [matchingSymptomsArray addObject:bk];
                }
        }
    }
DataArray is where all the Books are held.. more than a hundred. Its the main datasource for the UITableView. I'm trying to search and match each letter of the string with the Book.name, but even before I can begin, I cant do the for(Book *bk in LetterArray) //producing the error..

What seems to be the problem?

This is the error in console ** -[Book countByEnumeratingWithStatebjects:count:]: unrecognized selector sent to instance 0x55c110 2009-09-29 06:17:41.073 Smart Diagnosis[3897:20b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[Book countByEnumeratingWithStatebjects:count:]: unrecognized selector sent to instance 0x55c110'*

Any work arounds??

thanks for your help
raheel is offline   Reply With Quote
Reply

Bookmarks

Tags
nsmutablearray, search

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 245
16 members and 229 guests
@sandris, ADY, Alsahir, dacapo, Dani77, djohnson, HemiMG, jansan, JasonR, MarkC, mer10, prchn4christ, ryandb2, smethorst, tomtom100
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,762
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:59 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0