0

Please someone help me! I've been at this all day. I've seen several different stackoverflow questions that got answered with this problem, but I've tried everything, and I just can't figure it out. Here is my whole project so I don't have to paste multiple files worth of code here. The problem is that when I try to run my app, Xcode gives me this error in the console.

2012-04-23 17:28:33.638 KMLViewer[96646:11603] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x6d8d5e0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key pageControl.'
*** First throw call stack:
(0x114c022 0x12ddcd6 0x114bee1 0xc5022 0x36f6b 0x36edb 0x51d50 0x59771a 0x114ddea 0x10b77f1 0x59626e 0x597eb7 0x374ce1 0x374ff8 0x37417f 0x383183 0x383c38 0x377634 0x1d46ef5 0x1120195 0x1084ff2 0x10838da 0x1082d84 0x1082c9b 0x373c65 0x375626 0x27bd 0x2735)
terminate called throwing an exception

Thanks for any help! Here's the link to download it: http://www.mediafire.com/?4rd4xy8of1yv4ea

Ken Thomases
  • 88,520
  • 7
  • 116
  • 154
Jordan Clark
  • 153
  • 1
  • 5
  • 11

3 Answers3

1

Your Class definition in OneTranquille.xib is wrong. It shows "KMLViewerViewController" but it should be "OneTranquille"

Andy Obusek
  • 12,614
  • 4
  • 41
  • 62
1

The error shows that the pageControl setter is being called on a UIApplication object but it is defined on your UIScrolView_... class. This indicates a mixup between two class names; one place where this is common is in nib files. It turns out that your 'Main nib file base name' (located in the Info settings for the KMLViewer target) is wrong - it should be MainWindow. Once you fix that - the application runs a bit further but runs into a 'map' setter problem (which is probably fixed by @obuseme's response).

GoZoner
  • 67,920
  • 20
  • 95
  • 145
  • Awesome help! I have done the fix that both you and obuseme have suggested, but still can't get past that new error. Any other suggestions? Thanks a ton again! – Jordan Clark Apr 24 '12 at 01:27
  • Not sure what the 'new error' is but the general cause for this type of problem is that you define something to be of type X but then in a xib file you connect something of type Y. The code then tries to run an X method on an object of type Y and it fails. You need to review your connections to ensure that they are all consistent. – GoZoner Apr 24 '12 at 01:38
  • Thank you for this, I am continuing to review them over-and-over again, and nothing is standing out to me. The new error is the "key map" error. Thanks again for the help. – Jordan Clark Apr 24 '12 at 01:40
  • Well, I answered the original question and provided some general guidance to help you along. Look for places where you are expecting a OneTranquille but might be getting a UIScrollView_PagingViewController. That's all I can help with now. – GoZoner Apr 24 '12 at 01:47
  • Ok well thank you for all your help. I will continue to do this then. – Jordan Clark Apr 24 '12 at 01:48
  • Please mark my answer as correct. Also, in your MainWindow.xib you create a 'Scroll View Paging View Controller'. If you look at the 'View Controller' properties for this object under 'Nib Name' it says 'OneTranquille' - which is another case where your data types are mixed up. Fix these, one by one, carefully. [actually, fix that one and your program works.] – GoZoner Apr 24 '12 at 01:59
  • I'm sorry I am a noob at this. I know next-to-nothing when it comes to programming so I apologize for the very simple questions. – Jordan Clark Apr 24 '12 at 02:00
0

A further error may be a wrong or unnecessary Outlet named pagecontrol. Take a look at the outlets in the connection inspector.

masterof
  • 3
  • 1