3
在學習ExtJS 4時,我發現在定義一個新類時,在initComponent
方法中,可以使用this.callParent(arguments)
來調用父類的構造函數。「參數」變量來自「this.callParent(arguments)」哪裏?
我想知道這個arguments
可變(I知道它可以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
變量的定義,以及如何值分配給它?
在這種情況下的論據是「shekhar.MyWindow」 – Andy
我在另一個類似的帖子上回答了這個問題http://stackoverflow.com/a/32855950/1019307 – HankCa