title: reloading a tableview when source is NSURLConnection and gets new data
body: <p>I tabController app with uitableview getting NSURLconnection data and trying to display it. I can't figure out the issue. If I replace the connection with an array I'm storing all the drill-down works, but updating doesn't, So I think that the tableView end of things is fine. BUT: </p>
  
  <p>If I put [[self.tableview] reloadData]; in the -(void) connectionDidFinishLoading:</p>
  
  <p>This causes a loop of my parent row on the view. When you select a row it repopulates with the same row "Title", not the child of it. If I remove the [[self.tableview] reloadData]; The tableDataSource3 is empty and does not get refreshed with URL data so I need it.I have NSLogs that are showing the update so I know it's getting updated. </p>
  
  <p>If I put [[self.tableview] reloadData]; in the ViewDidAppear: </p>
  
  <p>the View is empty until I move out of the table and back (the app is a tabcontroller with tableViews). If I add a row in the database and update via NSURL connection the tableView stays as it is, but if I select a row the new data that was updated appears in the pushed table.  </p>
  
  <p>If I put [[self.tableview] reloadData]; in the ViewWillAppear:</p>
  
  <p>the View is empty until I move out of the table and back. however, the pushed child view is empty.</p>
  
  <p>Any Ideas?</p>
  
  <p>Here is the end of the NSURLconnection meth</p>
  
  <pre><code>    -(void) connectionDidFinishLoading:(NSURLConnection *)conn3 {
  
   ~ JSON STUFF~
  
    NSArray *test = [json objectForKey:@"Rows"];
    tableDataSource3 = [[NSArray alloc] initWithArray:test];
  
  
    [json release];
    [conn3 release];
    self.receivedData =nil;
    [[self tableview] reloadData];
      }
  </code></pre>
  
  <p>Here is the selection method:</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  
    //Get the dictionary of the selected data source.
   NSDictionary *dictionary = [self.tableDataSource3 objectAtIndex:indexPath.row];
  
   //Get the children of the present item.
   NSArray *Children = [dictionary objectForKey:@"Children"];
  
   if([Children count] == 0) {
  
    ItemDetailViewController *dvController = [[ItemDetailViewController alloc] initWithNibName:@"ItemDetailView" bundle:[NSBundle mainBundle]];
    [self.navigationController pushViewController:dvController animated:YES];
    [dvController release];
   }
   else {
  
     //Prepare to tableview.
    ThirdTab *rvController = [[ThirdTab alloc] initWithNibName:@"SecondView" bundle:[NSBundle mainBundle]];
  
  
    rvController.CurrentLevel3 += 1;
  
  
    rvController.CurrentTitle3 = [dictionary objectForKey:@"Title"];
    [self.navigationController pushViewController:rvController animated:YES];
  
    rvController.tableDataSource3 = Children;
  
    [rvController release];
   }
  
  }
  </code></pre>