我想知道我们如何将组件的变量传递给函数?如下所示:
// here is the function that I want to pass 'winArticle' by parameter
var getLevels = function(win) {
return win.down('fieldset[id=article-fieldset]').items.items.length;
}
var winArticle = new Ext.Window({
...
handler : function() {
// I tried this but nothing happen
getLevels('winArticle');
}
});