Modal view error


I have the following IBAction code for the ItemsViewController:

[code]- (IBAction)addNewPossession:(id)sender
Possession *newPossession = [[PossessionStore defaultStore] createPossession];
ItemDetailViewController *detailViewController =
[[ItemDetailViewController alloc] initForNewItem:YES];

[detailViewController setDelegate:self];
[detailViewController setPossession:newPossession];

UINavigationController *nCon = [[UINavigationController alloc] 

[detailViewController release];

[nCon setModalPresentationStyle:UIModalPresentationFormSheet];
[nCon setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];

// navController is retained by self when presented
[self presentModalViewController:nCon animated:YES];

[nCon release];

Everything was hunky dory through chapter 16. The code works but throws an exception on the presentModalViewController:

[quote]terminate called throwing an exceptionsharedlibrary apply-load-rules all
Current language: auto; currently objective-c
I also compiled the chapter 17 code from the Solutions folder and it threw the same exception. Where do I go from here?



The quoted text isn’t the exception, it’s just gdb firing up.

You should be able to find some text that says something like “reason: Blah blah”.

Are you on 4.2 beta? This could be the problem (and perhaps why you don’t see the exception text).