|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
‘presentModalViewController:setAnimated:’ is throwing an exception.
Hello.
I’m trying to get the ‘Add’ button on my navigation bar in the RootViewController of my navigation-based iPhone application to bring up a modal view controller. All I’ve done so far in the program is what I’ve listed below. I created a navigation-based app, uncommented the ‘viewDidLoad:’ method and added the following lines to it: Code:
UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addSimpleTest)]; self.navigationItem.rightBarButtonItem = addButton; [addButton release]; Code:
- (void)addSimpleTest; Code:
- (void)addSimpleTest
{
SimpleTest *simpleTest = [[SimpleTest alloc] initWithNibName:@"SimpleTest.xib" bundle:nil];
[self presentModalViewController:simpleTest animated:YES];
[simpleTest release];
}
Code:
2010-06-13 10:51:50.617 Testing[24725:207] *** -[NSKeyedUnarchiver initForReadingWithData:]: data is NULL 2010-06-13 10:51:50.621 Testing[24725:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '(null)' I’m using Xcode version 3.2.3 (pre-release) 64-bit. The Xcode IDE version is 1680.0. The iPhone Simulator is at version 4.0 (204) and I’m running Mac OS X version 10.6.3. If anyone could lend me a helping hand here, I would really appreciate it. Thank you. |
|
|
|
0
|
|
|
#2 |
|
Never mind. The problem was that the NIB name should not contain the “.XIB” extension. It’s working now.
|
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| Would I be an exception to an expired extended warranty replacement program? | c0bracommander | iMac | 3 | Mar 1, 2010 04:09 AM |
| About an exception | iphonejudy | iPhone/iPad Programming | 1 | Aug 11, 2009 09:41 AM |
| XCode - how to "see" an exception that is thrown | GregX999 | Mac Programming | 4 | Apr 11, 2009 12:13 PM |
| WebObjects throwing inappropriate exceptions in multi-component apps | GeeYouEye | Mac Applications and Mac App Store | 0 | Apr 17, 2005 02:13 AM |
| An Exceptional Apple Store Experience! | IJ Reilly | General Mac Discussion | 11 | Apr 14, 2005 06:00 PM |
All times are GMT -5. The time now is 09:47 PM.








Linear Mode

