PDA

View Full Version : Custom defined class returns no XType



hermann.s
29 Aug 2013, 3:54 AM
Hi, I have the following class :


Ext.define('Base.Container', {
extend: 'Ext.container.Container',

id: '',


hideMode: 'offsets',
layout: 'accordion'


constructor : function(id)
{
this.id = id;


this.callParent();
}
});


When I create an object and call getXType() I receive 'undefined'.


var projectContainer = new Base.Container('@BFE.Frontend.Project.Container');

How is this solved? Am I doing something wrong?

scottmartin
29 Aug 2013, 4:42 AM
Add

alias: 'widget.my-base-container'
or
xtype: 'my-base-container'

under extend: 'Ext.container.Container'

Also .. do not hard an 'id' ... simply remove that code.

Scott.