2011-03-28 64 views
4

我創建了一個新的MonoMac項目並使用Interface Builder(Xcode)打開了MainWindow.xib。在做一個簡單的改變(重命名爲Window標題)後,該項目不能再構建。 有誰知道如何解決這個問題?MonoMac:和Xcode 4.0錯誤:「Interface Builder文件中的未知窗口類MainWindow」

我在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 instead

Unhandled 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疑難解答幫助我猜它不能在這種情況下算,因爲類主窗口已經默認存在..

回答

1

This post包含一個解釋回顧Xcode 4.0的不完全支持。建議使用Xcode 3.2.6,直到支持Xcode 4.0。

相關問題