在学习 ExtJS 4 时,我发现在定义一个新类时,在initComponent方法中可以使用this.callParent(arguments).
我想知道这个arguments变量(我知道它可以是args或a也可以arg)是在哪里定义的,以及它的值是在哪里分配的。
例如,如果我将我的类定义如下:
Ext.define('shekhar.MyWindow', {
extend : 'Ext.Window',
title : 'This is title',
initComponent : function() {
this.items = [
// whatever controls to be displayed in window
];
// I have not defined argument variable anywhere
// but still ExtJS will render this window properly without any error
this.callParent(arguments);
}
});
有谁知道这个arguments变量是在哪里定义的,以及如何为其分配值?