View Full Version : Pop - up (window) height from properties

5 Nov 2012, 11:29 AM
Hi All,
The application I am trying to create, has multiple pop-ups for various info to user.

I am trying to make the properties of these pop ups uniform, like making their height and width, title at one place.
I had the option of creating one MyApp.Window with the required properties and creating the rest of the pop ups by extending it.

But I am looking for some solution like, maintaining a js class of statics, which has all the settings of the application and use those statics all over the place, like:

Ext JS does not recognize thses values when provided as
Ext.define('MyApp.view.user.List' ,{
extend: 'Ext.window.Window'
title: MyApp.Constants.AppName

Is inheritance the only way to do this or am I doing anything wrong when setting the statics?

6 Nov 2012, 2:00 AM
Are these properties undefined there?

When extending and setting properties it is better to use initComponent

Ext.define('MyApp.view.user.List' ,{
extend: 'Ext.window.Window',

initComponent: function(){

this.title = MyApp.Constants.AppName; //<-- check if it is defined (debugger?)