Just as a quick follow on - in this process of line by line updating with
lots of cut and pastes

I set up a new xib - open it in xcode put similar views and controls in and
call the controls by the same names - connect them with the *.h - save and
return to MD 

I have had a least 5 occasions where on returning to MD the recently entered
outlets are not recognised for no apparent reason.

So I find if I return to xcode delete the most recently entered recreate
them  and try again-  after about the third attempt they appear as valid
refferenceable properties in MD 

On some occasions in xcode I get a message that there is no *.h file 

On others I cannot click 'connect' on the popup without an error message
(something about cannot connect to this class or whatever) 

As a dumbo beginner I just assumed it was me and tried to figure a
workaround without taking careful note of the error  but there does seem to
be something precarious about how work in xCode is transferred to MD 

Clearly it is disastrous if you try and cut and paste something which is not
valid in the new way of doing things and some of my problems may be related
to that but as you can see the exception message ain't very helpful and the
process of trying to use old code is very unforgiving.

John Murray 

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of John Murray
Sent: 28 February 2012 21:18
To: [email protected]
Subject: [MonoTouch] may be related to importing old XIB files - Unhandled

 

I have been painfully going through my old code and creating a new project 

I know many things are  now done differently so one treads carefully 

Re Curtis Shipley'squery I've found it best to start afresh and simply
create new interfaces using previous names then hook them up to the old code

I have successfully imported a previous XIB and copied and pasted the
controls to a new viewcontroller/view or whatever 

There is one error here which I am fairly sure is to  do with  MT or MD

 

If one copies and pastes a control which doesn't work in the new version
such as trying import a dialogcotroller or placing a navcontroller where a
viewcontroller is expected then it throws an unhandled 

The problem is - one remove all references to the offending Controller but
the unhandled continues 

I had a UINavigationController which I imported and in error tried to push
it onto another  navigationcontroller where I should have been pushing a
viewcontroller

I removed the imported and cut and pasted items (all including all controls)
I removed all reference to them in the *.h files and in the designer.cs
deleted them in xCodein fact done everything apart from setting fire to my
macbook.

I still end up with an unhandled - I cannot seem to get back to the point
before this stage of cutting and pasting where the app compiled and ran fine


The output is shown below - the 'airfselectcontroller' was the old
navigationcontroller which I have completely removed - cleaned and rebuilt
but it still shows up in the unhandled - is there somewhere else I should
look for a reference to it 

 

I'd be grateful for any response J 

John Murray 

 

Unhandled Exception: MonoTouch.Foundation.MonoTouchException: Objective-C
exception thrown.  Name: NSUnknownKeyException Reason: [<mainview 0x9bde930>
setValue:forUndefinedKey:]: this class is not key value coding-compliant for
the key airfselectcontroller.

  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 0x9bde930>
setValue:forUndefinedKey:]: this class is not key value coding-compliant for
the key airfselectcontroller.

  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 

 

 

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

Reply via email to