1 - In my application.js I have a singleton that stores application configuration, like this:

Ext.define('Globals',{
singleton: true,
loggedIn: false
});

So far, I'm starting my app with a custom "app.js", because Designer overwrites my file removing my Ext.define. How/where can I add this code to my app in Designer?.

2 - In my app, I only want to declare Controllers in the main app file, but Designer adds Stores, Views and Models automatically. How can I force Designer to only add Controllers?.

Thanks in advance,
Leonardo.

aconran

3 Feb 2012, 6:12 AM

1) You can put this inside your launch method of the application. Double click on the Application node (or click on the application and go to the code view). Then use the drop down in the top left to switch to the launch method.

2) This is currently by design. Are you putting the stores/views/models on a different controller other than the application controller? If so the designer should prompt you to remove it from Application when you add it to the controller.

martinrame

3 Feb 2012, 12:53 PM

Thanks aconran, I solved question #2.

Regarding #1, I added a model named "User" and created an instance in app launch as follows: