I noticed that in a lot of the programs I have been modifying recently they always call the parent arguments of the current object. I know that this is needed but don't have a solid understanding as to why this is a common practice. Any wisdom out there for a junior level developer... I should know this.
相关问题
- Sencha Touch Uncaught typeError: undefined is not
- How I'll create a model from json file? (ExtJS
- Decimal precision in an EXTJS grid
- How to add an Extra button on Extjs grid header me
- Confused on prototype bindings, this statement
相关文章
- Sencha Ext.define Uses vs Requires
- Scrolling issues with ExtJS 5 app inside IFrame
- Can you explain the concept of the this pointer? [
- Can I use “this” in mapMutations spread inside Vue
- Sencha Touch in WebView
- load different views into viewport
- Abort an ext js grid store ajax call
- Disabling the timezone conversion in ExtJS
According to the doco (thanks javaCoder) http://docs.sencha.com/extjs/5.0/5.0.1-apidocs/#!/api/Ext.Base-static-method-callParent:
And
arguments
is:Though this suggests to me that
arguments
represents the argument object to this method. However when looking at the Developer Tools, it is that object encapsualted in another object that also includes some other information such as the callee:I don't know which version is this question about. But as far as my code goes, in Ext JS 5,
callParent()
- Calls the "parent" method of the current method. That is the method previously overridden by derivation or by an overrideTry out this code.
MyApp.test::LifecycleExample.js
MyApp.test::TrialComponent.js (Ext.Component)
The output in the console of the browser is:
callParent( args ) Call the "parent" method of the current method. That is the method previously overridden by derivation or by an override
Reference is ext js api docs.
http://docs.sencha.com/extjs/5.0/apidocs/#!/api/Ext.Base-method-callParent
This is the mechanism that ExtJS uses to support class inheritance in constructors. Calling
this.callParent(arguments)
in a constructor calls the constructor of the immediate parent class that's being extended.