Saturday, February 07, 2009

I'm starting to hate this error

So, I'm learning Objective - C now - Yeah so I can be like all of those other iPhone developers.... 

I am doing it for a very specific reason though - over at LifeAware we're trying to port or application to the iPhone platform.  We were recently accepted into Apple's iPhone Developer Network which is kind of cool - it cost $99 of course but cool nonetheless. 

Once we got accepted I immediately ran out and purchased an iPod Touch to do development on.  It is an impressive device - I think it's overpriced - but it is pretty damn cool. 

But - I digress. 

I've been working through a spectacular book on iPhone devleopment called "Beginning iPhone Development - Exploring the iPhone SDK".

It is a fabulous book that has links to an active community forum of a bunch of other people learning together.  If you're looking for a good technical book that is pretty easy to follow and teaches a lot of stuff this is a good one.

However, with all projects you eventually need to step away from the tutorials and start building the next greatest thing and that's when the crazy errors start rolling in.

This is my current nemesis:

2009-02-07 20:53:13.535 NavTest[830:20b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "MySpecialView" nib but the view outlet was not set.'

So I've finally figured it out (thanks to the book) the error is actually pretty decent.  It is saying - a view was requested and it was found but the view couldn't be rendered because the outlet for the view wasn't defined.  Here is a quote from the book that warns about the danger:

When we  changed the underlying class of the file’s owner, the existing outlet connections were broken.   As a result, we need to reestablish the connection from the controller to its view.  Control‑ drag from the File’s Owner icon to the View icon, and select the view outlet to do that.

Which is really the solution to most problems.... RTFM

Cheers,

-Aaron

No comments: