PDA

View Full Version : Transitioning Between Views Error




sclaxplayer
Sep 3, 2009, 01:38 PM
Hi I am trying to transition between two views, and I keep getting this error:

2009-09-03 11:35:00.701 iTab[4400:20b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<HomeViewController 0xd0c0c0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key delegate.'
2009-09-03 11:35:00.705 iTab[4400:20b] Stack: (
807902715,
2506030651,
808061681,
810717848,
810716389,
816538544,
807805711,
816533170,
816541363,
815230552,
815224116,
815223834,
9213,
9778,
810767821,
807687328,
807683624,
839142449,
839142646,
814752238,
8544,
8398
)

[Session started at 2009-09-03 11:35:00 -0700.]
GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 4400.
(gdb)

I'm not sure what's going wrong but I think it is a simple connection I am missing between my view and the coding. Here's the code I am currently using:

-(void) gotoHome{
HomeViewController *aHomeView = [[HomeViewController alloc] initWithNibName:@"MainWindow" bundle:nil];
[self setHomeViewController:aHomeView];
[aHomeView release];

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];

[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:window cache:YES];
[viewController.view removeFromSuperview];
printf("going home");
[self.window addSubview:[homeViewController view]];
printf("going home8");
[UIView commitAnimations];
printf("going home9");
}

It prints out going home before it errors out.
Thanks for any help.