MonoMac:和 Xcode 4.0 错误:“Interface Builder 文件中的未知窗口类 MainWindow”
我创建了一个新的 MonoMac 项目,并使用 Interface Builder (Xcode) 打开 MainWindow.xib。进行简单的更改(重命名为窗口标题)后,项目无法再构建。 有谁知道如何解决这个问题?
我在 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] Interface Builder 文件中的未知窗口类 MainWindow, 创建通用窗口来代替
未处理的异常:System.InvalidCastException:无法从源类型转换为目标类型。 在HelloWorld.MainWindowController.get_Window() <0x0002e>; 在 HelloWorld.AppDelegate.FinishedLaunching (MonoMac.Foundation.NSObject) <0x0003d> 处 在(包装动态方法)对象。[HelloWorld.AppDelegate.Void FinishedLaunching(MonoMac.Foundation.NSObject)](MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.Foundation.NSObject)<0x00033> 在(包装本机到托管)对象。[HelloWorld.AppDelegate.Void FinishedLaunching(MonoMac.Foundation.NSObject)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.Foundation.NSObject) <0x000eb> at (包装器托管到本机) MonoMac.AppKit.NSApplication.NSApplicationMain (int,string[]) <0x00003>; 在 MonoMac.AppKit.NSApplication.Main (string[]) <0x00017> 在 HelloWorld.MainClass.Main (string[]) <0x00019>
感谢您的任何帮助。
干杯
PS:我在 http://monotouch.net/Documentation/Troubleshoot#Unknown_class_XXXX_in_Interface_Builder_filebut 上找到了故障排除帮助,我想它不会在这种情况下不算数,因为默认情况下类 MainWindow 已经存在。
I've created a new MonoMac project and opened the MainWindow.xib with Interface Builder (Xcode). After doing a simple change (renamed Window title), the project can't be built anymore.
Does anyone know how to fix this?
I'm using MonoDevelop 2.6, MonoFramework-2.10.1 with Xcode 4.0 on OS X 10.6.7.
This is the error message:
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>
Thanks for any help.
Cheers
PS: I found a troubleshooting help on http://monotouch.net/Documentation/Troubleshoot#Unknown_class_XXXX_in_Interface_Builder_filebut I guess it doesn't count in this case, since the class MainWindow already exists by default..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想我已经找到答案了:
http://go-mono.com/forums/#nabble-td3390853
Xcode 4.0现在还没有真正支持..但我希望其他人纠正我:-)
I think I've found the answer:
http://go-mono.com/forums/#nabble-td3390853
Xcode 4.0 is not really supported right now.. but I hope someone else corrects me :-)
这篇文章包含有关不完整支持的说明Xcode 4.0。建议使用 Xcode 3.2.6,直到支持 Xcode 4.0。
This post contains the explanation about the incomplete support of Xcode 4.0. It is recommended to use Xcode 3.2.6 until Xcode 4.0 is supported.