Google Chrome - “aw snap”使用 Ext JS 4.0 的错误消息

发布于 2025-01-03 14:49:41 字数 854 浏览 4 评论 0原文

我的控制器中有以下代码。这在 Internet Explorer 9 和 Firefox 中运行良好。但是,我在 Chrome 中收到“aw snap!。出了点问题......”错误消息。

init: function () {
    this.control({
        'jobslist': {
            selectionchange: this.onJobSelect
        },
        'jobdetail button[action=create]': {
            click: this.onNewJobSelect
        },
        'jobdetail button[action=save]': {
            click: this.onJobUpdate
        },
        'jobform button[action=remove]': {
            click: this.onJobRemove
        }
    });
},

onLaunch: function () {
    var jobsStore = this.getJobsStore();
    jobsStore.load({
        callback: this.onJobsLoad,
        scope: this
    });
},

onJobUpdate: function (selection) {
    var form = Ext.getCmp('jobForm');
    var record = form.getRecord();
    var values = form.getValues();
    record.set(values);
}

I have the following code in my controller. This works fine in Internet Explorer 9 and Firefox. However, I get "aw snap!. Something went wrong ..." error message in Chrome.

init: function () {
    this.control({
        'jobslist': {
            selectionchange: this.onJobSelect
        },
        'jobdetail button[action=create]': {
            click: this.onNewJobSelect
        },
        'jobdetail button[action=save]': {
            click: this.onJobUpdate
        },
        'jobform button[action=remove]': {
            click: this.onJobRemove
        }
    });
},

onLaunch: function () {
    var jobsStore = this.getJobsStore();
    jobsStore.load({
        callback: this.onJobsLoad,
        scope: this
    });
},

onJobUpdate: function (selection) {
    var form = Ext.getCmp('jobForm');
    var record = form.getRecord();
    var values = form.getValues();
    record.set(values);
}

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

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

发布评论

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

评论(2

请叫√我孤独 2025-01-10 14:49:41
init: function () {
        this.control({
           , <------ here
            'jobdetail button[action=save]': {
                click: this.onJobUpdate
            }
        });
    },

您的对象中有一个空白值。这可能会打破它。

init: function () {
        this.control({
           , <------ here
            'jobdetail button[action=save]': {
                click: this.onJobUpdate
            }
        });
    },

You have a blank value in your object. This is probably breaking it.

素手挽清风 2025-01-10 14:49:41

最后经过一番折腾才解决了这个问题。我的观点是扩展网格:

Ext.define('MyApp.view.PartForm', {
    extend: 'Ext.grid.Panel',

它应该是

Ext.define('MyApp.view.PartForm', {
    extend: 'Ext.panel.Panel',

Finally, after much trouble resolved this. My view was extending grid:

Ext.define('MyApp.view.PartForm', {
    extend: 'Ext.grid.Panel',

It should have been

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