I am new to iphone development, I am trying to load NSMutableArray values ββinto a table view. For this, I use the following code, which generates an error as indicated. Can anyone help me fix this error.
code: -
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
error: -
2011-02-25 07:22:24.470 iPhone[1032:207] -[__NSArrayM isEqualToString:]: unrecognized selector sent to instance 0xab15d30 2011-02-25 07:22:24.471 iPhone[1032:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM isEqualToString:]: unrecognized selector sent to instance 0xab15d30' *** Call stack at first throw:
Print Description My NSMutableArray: -
2011-02-25 07:21:54.806[1032:207] ( ( "viral_tweeter", default1571546, default1570056, twilightsaga, "wp-monetizer", viraltweetbuild, "building_a_list", yourtwittertips, "twitter_profit", mikesbi, mikesbizz, default1164341, incbizztest, default1164319, iprotv, iwantafreecopy1, tweeterbuilder, trafficlists, myadsensenews, mysafelistnews, myviralnews, safelistology, slmembers, slpmembers, twonderlandlist, noseospider, yseospider, digitallockdown, alistblueprint, classifiedtips, incbizzblog, "xit-trafficbeta", twwidget, jvtrafficfunnel, instantmlmspage, listbuldingmax, "incbizz_tips" ) )
code to parse HTTP Get a response: -
- (void)requestDataFetcher:(GTMHTTPFetcher *)fetcher finishedWithData:(NSData *)data error:(NSError *)error { // this is only for testing whether the data is coming or not // NSDictionary *tempDict = [GTMOAuthAuthentication dictionaryWithResponseData:data]; if (error) { NSLog(@"Error: in getting data after authentication : %@",[error description]); } else { // NSLog(@"Succcess: in getting data after authentication \n data: %@",[tempDict description]); NSString* aStr; aStr = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding]; NSDictionary *dictionary = [aStr JSONValue]; NSArray *keys = [dictionary allKeys]; Names = [[NSMutableArray alloc]init]; int i = 0; // values in foreach loop for (NSString *key in keys) { i++; NSArray *items = (NSArray *) [dictionary objectForKey:key]; // NSLog(@" test %@", items); if (i==3) { for (NSString *item in items) { NSString* aStrs= item; // NSLog(@" test %@", aStrs); NSDictionary *dict = aStrs; NSArray *k = [dict allKeys]; for (id *it in k) { // NSLog(@"the child item: %@", [NSString stringWithFormat:@"Child Item -> %@ value %@", (NSDictionary *) it,[dict objectForKey:it]]); NSString *value = [it description]; if ( [value isEqualToString:@"name"]) { NSString * value = (NSString*)[[dict objectForKey:it] description]; NSLog(value); [Names addObject:value]; [[MySingletonClass sharedMySingleton] SetAweberList: value]; } } } } } mShowList.hidden = FALSE; } }