PDA

View Full Version : [Help] superclass.constructor.call



skhameneh
31 Mar 2011, 8:55 AM
I found a couple posts such as this one (http://www.sencha.com/forum/showthread.php?16908-HELP-superclass.constructor.call) that explain what I already understand, but what I'm trying to understand is why this is done...what are the benefits of working in the superclass scope?

I'm not asking for a long drawn-out explanation, but rather a real world example that shows what this provides. All I can see is manipulation of the parent class, but even so I'm trying to understand its use.

Thank you,
Shawn

skhameneh
31 Mar 2011, 8:59 AM
I believe I answered my own question, but I'd still appreciate examples so I can get more familiar with general ExtJS development.

mitchellsimoens
31 Mar 2011, 1:41 PM
All that's doing is really calling the function from the class you are extending from...


MyApp = Ext.exend(Ext.Panel, {
constructor: function(configuration) {
.....
MyApp.superclass.constructor.call(this, config);
},
....
});