View Full Version : Extending the enter App class

15 Jan 2014, 2:26 AM
Hi all,

i start my application with this inline code:

Ext.Loader.setConfig({enabled: true});

//Set application namespace infos
Ext.Loader.setPath('MyApp', 'my/app');

//App is the entry point class

//Init the application

All works fine.
Now i'm trying to extend the App class. So i have MyApp.ParentApp:

Ext.define('MyApp.ParentApp', {

myFunction: function(){
//Do something


And the MyApp.App become:

Ext.define('MyApp.App', {
extend: 'MyApp.ParentApp',

init: function(){
console.log("App init start");
console.log("App init end");


In this way nothing happens, the init method wasn't call. If i remove the extend all works fine (obviously i get an error of undefined myFunction in this case).

I hope I was clear, thanks for your help

EDIT: i've just found the solution. With extend the Ext.require must be into the onReady() function.

Gary Schlosberg
16 Jan 2014, 11:51 AM
Glad to see you found the solution, and thanks for sharing with the community.