1

I recently updated my project to dojo version 1.6.2 from 1.6.1 now I keep getting strange errors without any code changed.

Chrome error console:

Error parsing in _ContentSetter#Setter_DIV_0 
 /etermin/js/dojo-release-1.6.2/dojo/../dijit/layout/ContentPane.js:203
Error undefined running custom onLoad code: This deferred has already been resolved 
/etermin/js/dojo-release-1.6.2/dojo/../dijit/layout/ContentPane.js:142

Firefox error console:

dojo.js (vrstica 324)
Error parsing in _ContentSetter#Setter_DIV_0
Error: Could not load class 'dijit.form.FileringSelect

dojo.js (vrstica 372)
Error undefined running custom onLoad code: This deferred has already been resolved

There is a problem in the dojo.js file: If I change it back to 1.6.1 it makes things work. But I want to use 1.6.2 version

Plaease help and advise

UPDATE: Something strange that I've found:

  var p = new dijit.MenuItem({
        label: "cut",
    })

  p.onClick = function() {
            dojo.xhrGet({
//some ajax call
});
}

Doesn't work. But if I put just one simple alert before the ajax it works.

 p.onClick = function() {
alert("123");
                dojo.xhrGet({
    //some ajax call
    });
}
4

2 回答 2

1

这被报告为一个错误。

在此处查找错误报告..

您必须修补您的 dojo 版本或将其升级到 1.8 或更高版本才能修复它。

如果你知道你在玩什么,你可以手动修复它。

补丁在这里

您可以手动将此应用到您当前的 dojo 构建以修复它。

于 2013-09-10T05:34:14.100 回答
1

为什么不将您的版本更新到 1.9?迟早旧的 dojo 将不再工作,在 Google 托管库中我发现没有版本 1.6.2 看看: https ://developers.google.com/speed/libraries/devguide 它仍然可用吗?你从哪里得到dojo.js?

为了防止菜单的计时问题,您可以在定义 MenuItem 时定义 onClick。

看一看 :

var p = new dijit.MenuItem({
    label: "Menu Item With an icon",
    iconClass: "dijitEditorIcon dijitEditorIconCut",
    onClick: function(){alert('i was clicked')}
}));

问候,米里亚姆

于 2013-09-06T07:57:47.793 回答