Any ideas on where to look for this?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Any ideas on where to look for this?

Paul Johnson
Hi,

I'm building my app and while it compiles, when it's deployed to the
simulator the splash screen shows, but it quickly replaced by this

Unhandled Exception:
MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown.
Name: NSUnknownKeyException Reason: [<UIApplication 0x10c7cb60>
setValue:forUndefinedKey:]: this class is not key value coding-compliant
for the key Animals.
   at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
   at MonoTouch.UIKit.UIApplication.Main (System.String[] args,
System.String principalClassName, System.String delegateClassName)
[0x0004c] in
/Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
   at ftrack2ios.Application.Main (System.String[] args) [0x00001] in
/Volumes/Developer/Developer/new
ftrack/iOS/ftrack2-ios/ftrack2-ios/Main.cs:16

The only place I have Animals listed is in the Localizable.strings file
- it's not in any of the xib files.

Thanks

Paul
--
"Space," it says, "is big. Really big. You just won't believe how
vastly, hugely, mindbogglingly big it is. I mean, you may think it's a
long way down the road to the chemist's, but that's just peanuts to
space, listen..."
Hitch Hikers Guide to the Galaxy, a truly remarkable book!

_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch
Reply | Threaded
Open this post in threaded view
|

Re: Any ideas on where to look for this?

Nic Wise
Paul

If you are using xib's, have a google around for "this class is not
key value coding-compliant for the key" - there are lots of posts on
stackoverflow covering this.

eg
http://stackoverflow.com/questions/3088059/this-class-is-not-key-value-coding-compliant-for-the-key

or specific to monotouch:

http://stackoverflow.com/questions/12574444/not-key-value-coding-compliant-monotouch-and-ios-6

Drop an email back if these make no sense.

Cheers

N



On 11 May 2013 00:27, Paul Johnson <[hidden email]> wrote:

> Hi,
>
> I'm building my app and while it compiles, when it's deployed to the
> simulator the splash screen shows, but it quickly replaced by this
>
> Unhandled Exception:
> MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name:
> NSUnknownKeyException Reason: [<UIApplication 0x10c7cb60>
> setValue:forUndefinedKey:]: this class is not key value coding-compliant for
> the key Animals.
>   at (wrapper managed-to-native)
> MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
>   at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String
> principalClassName, System.String delegateClassName) [0x0004c] in
> /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
>   at ftrack2ios.Application.Main (System.String[] args) [0x00001] in
> /Volumes/Developer/Developer/new
> ftrack/iOS/ftrack2-ios/ftrack2-ios/Main.cs:16
>
> The only place I have Animals listed is in the Localizable.strings file -
> it's not in any of the xib files.
>
> Thanks
>
> Paul
> --
> "Space," it says, "is big. Really big. You just won't believe how vastly,
> hugely, mindbogglingly big it is. I mean, you may think it's a long way down
> the road to the chemist's, but that's just peanuts to space, listen..."
> Hitch Hikers Guide to the Galaxy, a truly remarkable book!
>
> _______________________________________________
> MonoTouch mailing list
> [hidden email]
> http://lists.ximian.com/mailman/listinfo/monotouch



--
Nic Wise
t.  +44 7788 592 806 | @fastchicken
b. http://www.fastchicken.co.nz/
_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch
Reply | Threaded
Open this post in threaded view
|

Re: Any ideas on where to look for this?

Paul Johnson
Hi Nic,

> or specific to monotouch:
>
> http://stackoverflow.com/questions/12574444/not-key-value-coding-compliant-monotouch-and-ios-6
>
> Drop an email back if these make no sense.

Yeah, makes sense that. Problem is that when I follow the link back to
the Xamarin website, it says there should be [Connect] lines in my
designer.cs file. My designer file though looks like this

using MonoTouch.Foundation;

namespace ftrack2ios
{
     [Register ("HomeView")]
        partial class HomeView
     {
         [Outlet]
                MonoTouch.UIKit.UIBarButtonItem btnSettings { get; set; }

         [Outlet]
                MonoTouch.UIKit.UILabel lblTitle { get; set; }

         void ReleaseDesignerOutlets()
         {
             if (btnSettings != null)
             {
                 btnSettings.Dispose();
                 btnSettings = null;
             }

             if (lblTitle != null)
             {
                 lblTitle.Dispose();
                 lblTitle = null;
             }
         }
     }
}

So no [Connect] bits which is probably the reason why it's not doing as
it is told and giving me the Key error. It could be that they stuff on
the Xam.iOS part of the trouble shooting (it does refer back to mono 2.4
on there) is out of date, but any advice here would be appreciated.

I'm using Xam Studio 4.1.2, Xam.iOS 6.3.4.36, Xcode 4.6.2.

ISTR an issue between Xam.iOS and Xcode 4.6.2 - is this still the case
and is worth rewinding to 4.6.1, running the xib files through xcode and
then trying again? I'm getting the same error if I take Xam.iOS back to
the stable release.

Paul

--
"Space," it says, "is big. Really big. You just won't believe how
vastly, hugely, mindbogglingly big it is. I mean, you may think it's a
long way down the road to the chemist's, but that's just peanuts to
space, listen..."
Hitch Hikers Guide to the Galaxy, a truly remarkable book!

_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch