View Full Version : Question about this.callParent.caller returning null

15 Dec 2015, 6:17 AM

I have an app (ext.js 4.2) that is composed of several js-files (a, b, c, ...), concatenated in a specific order; concat(a, b, c, ...). And this works nicely.

Now, to enable more rapid development I'd like to serve a, b, c, ... separately like such in the header:

<script src="a"/>
<script src="b"/>
<script src="c"/>

Note: ext.js is always included prior to my own files.

However, using separate serving I get a problem when calling this.callParent from inside a custom subclass. Because this call goes to this code block:

callParent: function(args) {
var method;

return (method = this.callParent.caller) && (method.$previous ||
((method = method.$owner ? method : method.caller) &&
method.$owner.superclass.self[method.$name])).apply(this, args || noArgs);

and when my files are not concatenated this.callParent.caller is always null. But when my files are concatenated, this.callParent.caller will correctly reference the function from which it was called. Typically at the end of a components initComponent method.

Can anyone help me with this?

Let me know if I need to clarify things.

Thanks in advance!

15 Dec 2015, 3:13 PM
There is no need to load the various files using script tag if you are creating a single page application with the recommended folder structure mentioned here:


All you need to do is mention in your application class the files that are required like this :


Take a look at this example:


Both the required files are loaded dynamically by ExtJS. no <script> tag needed.