gpt4 book ai didi

extjs4 - 在 extjs 中使用 createDelegate

转载 作者:行者123 更新时间:2023-12-02 05:11:36 29 4
gpt4 key购买 nike

这是我第一次尝试将用户定义的参数传递给 IE9 中 extjs(4.0.1) 中的处理程序函数。我有以下代码,但它抛出了一个错误,指出 SCRIPT438: Object doesn't support property or method 'createDelegate'。我不确定我做错了什么。请帮忙。

Js文件:

Ext.onReady(function() {

var appendBooleanOrInsertionIndex = 0;
var myButtonHandler = function(item,a, b, arg){
alert(a + " "+ b);
};

var myButton = new Ext.Button({
id : 'myButton',
//renderTo : 'mybutton',
text : 'Save',
handler : myButtonHandler.createDelegate(this, ['Hi', 'Kart'], appendBooleanOrInsertionIndex),
scope : this
});
});

最佳答案

Ext 停止向 Ext 4 中的原生类原型(prototype)添加逻辑。使用 Ext.Function.bindExt.Function.pass .

关于extjs4 - 在 extjs 中使用 createDelegate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15360952/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com