[MonoTouch] can anyone help!! mssing .h, outlets disappear an unhandled exc

Jeff Stedfast jeff at xamarin.com
Thu Mar 1 16:21:49 UTC 2012


Hi John,

I'm going to reply inline here in an attempt to limit confusion as much as
I can

On Thu, Mar 1, 2012 at 10:35 AM, john_m0101 <john at murray.gb.com> wrote:

> I've posted before but cant see the posts in the forum (I generally just
> send
> an email to ximian lists) so I presume that's why I dont get any response
> so
> I am trying positng to the forum on the web
>

I think you might need to be subscribed to the mailing-list in order to
post, your other emails are probably sitting in a moderation queue (helps
to cut out a lot of spam).


>
> I have had problems with .h files disappearing


What do you mean, exactly? I presume you mean disappearing from Xcode...
but disappearing how? Were the .h files there and then just disappeared? Or
did you double-click a .xib in MonoDevelop to launch Xcode and the .h files
weren't created?


> managed to recreate them from
> a backup by cuting and pasting


You had a backup of temporary .h files? Or what exactly did you restore?
I'm totally lost.


>  - this is almost the same as Chris_m' s
> issue. Right now I have bypassed it by creating a new project and cutting
> and pasting - but one shouldnt have to do this its such a time wast
>

I agree, and if we can figure out what went wrong, I'll do what I can to
prevent this sort of thing from happening again.


> As jeff Stedfast says this impression may be because IB is reindexing


I think we can rule out this hypothesis for the issue reported by Chris_M
and the other Chris in that thread (too many Chris's!).


> - I
> have had atleast 6 or 7 'hangs' with Xcode - a pop up says 'could not cloe
> Xcode - timeout' when this also affect MD I get another pop up which says
> the crash has been reported to Xamarin
>

What version of MonoDevelop are you using?

Is Xcode hanging? Or is it MonoDevelop that hangs?



> I dared to upgrade to Xcode 4.3 - seeing as how 5.2.5 of MT says it is
> compatible - I thought this might solve the endless crashes and unhandled
> exceptions
>
> I have gone back to a previous state of the code which WAS running - it
> compiles but when I run it I get
> /Unhandled Exception: MonoTouch.Foundation.MonoTouchException: Objective-C
> exception thrown.  Name: NSUnknownKeyException Reason: [<mainview
> 0x9b281d0>
> setValue:forUndefinedKey:]: this class is not key value coding-compliant
> for
> the key radarB.
>  at (wrapper managed-to-native)
> MonoTouch.ObjCRuntime.Messaging:void_objc_msgSend (intptr,intptr)
>  at MonoTouch.UIKit.UIWindow.MakeKeyAndVisible () [0x00000] in <filename
> unknown>:0
>  at iGar6.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication app,
> MonoTouch.Foundation.NSDictionary options) [0x00000] in <filename
> unknown>:0
>  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) [0x00000] in <filename
> unknown>:0
>  at iGar6.Application.Main (System.String[] args) [0x00000] in <filename
> unknown>:0 [ERROR] FATAL UNHANDLED EXCEPTION:
> MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown.
> Name: NSUnknownKeyException Reason: [<mainview 0x9b281d0>
> setValue:forUndefinedKey:]: this class is not key value coding-compliant
> for
> the key radarB.
> /
>
> The KEY it seems to be complaining about "radarB" is an old button which
> used to be on one of my views - long since deleted - clearly some reference
> to it remains - I am not completely stupid so of course I have searched
> EVERY file I can think of *.cs designer.cs *.h and *.m files and there i
> sNO
> reference to radarB ANYWHERE - I have cleaned the code until I am blue in
> the face
>

The reference is likely to be in one of your .xib files.

Something quick & easy you can try is going to the Build menu and selecting
"Clean". Then try building and running your app again. It's possible that
an old version of the .xib (or library that references radarB) is still in
the bin directory.

If that doesn't work, then it's likely that one of your .xib files contains
a reference.


Hope that helps,

Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monotouch/attachments/20120301/ad27a498/attachment.html>


More information about the MonoTouch mailing list