我创建了一个新的MonoMac项目,并使用Interface Builder(
Xcode)打开了MainWindow.xib.在进行简单更改(重命名为Window title)后,无法再构建项目.
有谁知道如何解决这一问题?
我在OS X 10.6.7上使用MonoDevelop 2.6,MonoFramework-2.10.1和Xcode 4.0.
这是错误消息:
2011-03-28 18:45:39.986 HelloWorld[30332:613] Unknown Window class MainWindow in Interface Builder file,
creating generic Window insteadUnhandled Exception: System.InvalidCastException: Cannot cast from source type to destination type.
at HelloWorld.MainWindowController.get_Window () <0x0002e>
at HelloWorld.AppDelegate.FinishedLaunching (MonoMac.Foundation.NSObject) <0x0003d>
at (wrapper dynamic-method) object.[HelloWorld.AppDelegate.Void FinishedLaunching(MonoMac.Foundation.NSObject)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.Foundation.NSObject) <0x00033>
at (wrapper native-to-managed) object.[HelloWorld.AppDelegate.Void FinishedLaunching(MonoMac.Foundation.NSObject)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.Foundation.NSObject) <0x000eb>
at (wrapper managed-to-native) MonoMac.AppKit.NSApplication.NSApplicationMain (int,string[]) <0x00003>
at MonoMac.AppKit.NSApplication.Main (string[]) <0x00017>
at HelloWorld.MainClass.Main (string[]) <0x00019>
谢谢你的帮助.
干杯
PS:我在http://monotouch.net/Documentation/Troubleshoot#Unknown_class_XXXX_in_Interface_Builder_filebut上找到了一个故障排除帮助我想在这种情况下不计算,因为默认情况下MainWindow类已经存在.
最佳答案 我想我找到了答案:
http://go-mono.com/forums/#nabble-td3390853
现在不支持Xcode 4.0 ..但我希望别人纠正我:-)