I’m new to iOS Development, so I’ve been following a bunch of tutorials online on how to make drill-down applications. I’ve run into this problem on two builds and I can’t seem to get over it. I’m creating a tab bar application. In my app delegate, I define a tab bar, navigation controller, view controller, and an NSDictionary for my .plist. Problem is, when I get to my ViewController.m’s file and start telling it to use the navigation controller i created, I get the error “Request for member is something not a structure or union.”
I’ve tried this twice, quadrupled checked the code, and I still don’t get it. Any help would be greatly appreciated 🙂
Below is the tableView method from my ViewController.m file.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
//Get the dictionary of the selected data source.
NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row];
//Get the children of the present item.
NSArray *Children = [dictionary objectForKey:@"Children"];
if([Children count] == 0) {
DetailViewController *dvController = [[DetailViewController alloc] initWithNibName:@"DetailView" bundle:[NSBundle mainBundle]];
[self.indNavControl pushViewController:dvController animated:YES];
[dvController release];
}
else {
//Prepare to tableview.
IndustriesViewController *indViewControl = [[IndustriesViewController alloc] initWithNibName:@"IndustryView" bundle:[NSBundle mainBundle]];
//Increment the Current View
indViewControl.CurrentLevel += 1;
//Set the title;
indViewControl.CurrentTitle = [dictionary objectForKey:@"Title"];
//Push the new table view on the stack
[self.indNavControl pushViewController:indViewControl animated:YES];
indViewControl.tableDataSource = Children;
[indViewControl release];
}
}
did you synthesize indNavControl?