iphone reload tableView

Posted by Brodie4598 on Stack Overflow See other posts from Stack Overflow or by Brodie4598
Published on 2010-05-18T02:19:52Z Indexed on 2010/05/18 2:30 UTC
Read the original article Hit count: 374

Filed under:
|
|

In the following code, I have determined that everything works, up until [tableView reloadData] i have NSLOGs set up in the table view delegate methods and none of them are getting called. I have other methods doing the same reloadData and it works perfectly. The only difference tha I am awayre of is tha this is in a @catch block. maybe you smart guys can see something i'm doing wrong...

@catch (NSException * e) {////chart is user genrated
    logoView.image = nil;
    NSInteger row = [picker selectedRowInComponent:0];
    NSString *selectedAircraft = [aircraft objectAtIndex:row];
    NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
                                                         NSUserDomainMask, YES);
    NSString *docsPath = [paths objectAtIndex:0];
    NSString *checklistPath = [[NSString alloc]initWithFormat:@"%@/%@.checklist",docsPath,selectedAircraft];
    NSString *dataString = [NSString stringWithContentsOfFile:checklistPath encoding: NSUTF8StringEncoding error:NULL];


    if ([dataString hasPrefix:@"\n"]) {
        dataString = [dataString substringFromIndex:1];
    }
    NSArray *tempArray = [dataString componentsSeparatedByString:@"\n"];

    NSDictionary *temporaryDictionary = [NSDictionary dictionaryWithObject: tempArray forKey:@"User Generated Checklist"];
    self.names = temporaryDictionary;


    NSArray *tempArray2 = [NSArray arrayWithObject:@"01User Generated Checklist"];
    self.keys = tempArray2;
    aircraftLabel.text = selectedAircraft;
    checklistSelectPanel.hidden = YES;
    [tableView reloadData];


}

© Stack Overflow or respective owner

Related posts about reloaddata

Related posts about iphone