Hi all,
I'm trying to create an application (navigation based, I might add) which loads different xml data in different views.
The RootViewController loads without problems, but when I select a row I get a variety of errors.
There are two options: "By Room" and "See All". If I select the first option, it loads the RoomMenuController, and the second loads the EveryoneController.
On selecting "By Room" I get the following error:
I have no idea how to interpret the stack and I don't know why the problem is caused. I've set breakpoints in the viewDidLoad methods of all the ViewControllers but these methods are never called, so I don't think the problem is in the ViewControllers.
On selecting the second options I get an EXC_BAD_ACCESS signal which I assume means that it is trying to load something that has already been released. I don't know why this is, however.
I'm loading my ViewControllers in the following manner:
(that's from the viewDidLoad method of RootViewController.m)
Any help with this would be much appreciated because I'm stumped but that's probably because I've only been doing this for a few days.
I'm trying to create an application (navigation based, I might add) which loads different xml data in different views.
The RootViewController loads without problems, but when I select a row I get a variety of errors.
There are two options: "By Room" and "See All". If I select the first option, it loads the RoomMenuController, and the second loads the EveryoneController.
On selecting "By Room" I get the following error:
Code:
2009-09-28 13:01:43.901 Assisted Living 2.0[3838:207] *** -[UITouchData setParentViewController:]: unrecognized selector sent to instance 0x382b6a0
2009-09-28 13:01:43.902 Assisted Living 2.0[3838:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UITouchData setParentViewController:]: unrecognized selector sent to instance 0x382b6a0'
2009-09-28 13:01:43.904 Assisted Living 2.0[3838:207] Stack: (
29291611,
2523598665,
29673531,
29242998,
29095618,
3282295,
3260859,
11550,
3037850,
3021016,
274874,
29076160,
29072456,
37377965,
37378162,
2764803,
8640,
8494
)
I have no idea how to interpret the stack and I don't know why the problem is caused. I've set breakpoints in the viewDidLoad methods of all the ViewControllers but these methods are never called, so I don't think the problem is in the ViewControllers.
On selecting the second options I get an EXC_BAD_ACCESS signal which I assume means that it is trying to load something that has already been released. I don't know why this is, however.
I'm loading my ViewControllers in the following manner:
Code:
views = [[NSMutableArray array] init];
[views addObject:[[[RoomMenuController alloc] initWithNibName:@"RoomMenu" bundle:[NSBundle mainBundle]] retain]];
[views addObject:[[[EveryoneController alloc] initWithNibName:@"Everyone" bundle:[NSBundle mainBundle]] retain]];
[views addObject:[[[PeopleByRoomController alloc] initWithNibName:@"PeopleByRoom" bundle:[NSBundle mainBundle]] retain]];
Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"navigationController=%@", [self navigationController]);
NSLog(@" before push: stack=%@", [[self navigationController] viewControllers]);
NSLog(@" pushing: %@", [views objectAtIndex:indexPath.row]);
UIViewController *ctrl = [views objectAtIndex:indexPath.row];
[[self navigationController] pushViewController:ctrl animated:YES];
[ctrl release];
NSLog(@" after push : stack=%@", [[self navigationController] viewControllers]);
}
Any help with this would be much appreciated because I'm stumped but that's probably because I've only been doing this for a few days.