Monotouch 3.99:设计器文件中缺少使用?

发布于 2024-10-28 02:09:06 字数 1317 浏览 1 评论 0原文

Monotouch 3.99.13

当我在Interface Builder 中编辑XIB 时,Monotouch 无法将所有Usings 添加到它生成的designer.cs 文件中。没有制作部分课程。

在此处输入图像描述

这是一个代码片段(注意没有使用):

// ------------------------------------------------------------------------------
//  <autogenerated>
//      This code was generated by a tool.
//      Mono Runtime Version: 2.0.50727.1433
// 
//      Changes to this file may cause incorrect behavior and will be lost if 
//      the code is regenerated.
//  </autogenerated>
// ------------------------------------------------------------------------------

namespace General {


    // Base type probably should be MonoTouch.Foundation.NSObject or subclass
    [MonoTouch.Foundation.Register("AppDelegateIPad")]
    public partial class AppDelegateIPad {

        private UIWindow __mt_window;

        #pragma warning disable 0169
        [MonoTouch.Foundation.Connect("window")]
        private UIWindow window {
            get {
                this.__mt_window = ((UIWindow)(this.GetNativeField("window")));
                return this.__mt_window;
            }
            set {
                this.__mt_window = value;
                this.SetNativeField("window", value);
            }
        }
    }
}

Monotouch 3.99.13

When I edit a XIB in Interface Builder, Monotouch fails to add all the Usings to the designer.cs files it generates. There are no partial clsses made.

enter image description here

Here's a code snip (notice no usings):

// ------------------------------------------------------------------------------
//  <autogenerated>
//      This code was generated by a tool.
//      Mono Runtime Version: 2.0.50727.1433
// 
//      Changes to this file may cause incorrect behavior and will be lost if 
//      the code is regenerated.
//  </autogenerated>
// ------------------------------------------------------------------------------

namespace General {


    // Base type probably should be MonoTouch.Foundation.NSObject or subclass
    [MonoTouch.Foundation.Register("AppDelegateIPad")]
    public partial class AppDelegateIPad {

        private UIWindow __mt_window;

        #pragma warning disable 0169
        [MonoTouch.Foundation.Connect("window")]
        private UIWindow window {
            get {
                this.__mt_window = ((UIWindow)(this.GetNativeField("window")));
                return this.__mt_window;
            }
            set {
                this.__mt_window = value;
                this.SetNativeField("window", value);
            }
        }
    }
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

友谊不毕业 2024-11-04 02:09:06

有人将此作为错误提交到此处的最新 MonoDevelop 中。那是你吗?据我所知,MonoDevelop 从未在设计器文件中生成 using 语句。

Someone has filed this as a bug in the latest MonoDevelop here. Is that you? As far as I can tell MonoDevelop has never generated using statements in designer files.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文