PDA

View Full Version : Error with compositefield



madirishman
15 Jun 2010, 4:56 PM
Hi all, everything works great - until I add a composite field to my form. I always get this error:

b[d.xtype || e] is not a constructor

(ext-all.js (line 7))

has anyone experienced this? The code looks clean enough:




MyCompositeFieldUi = Ext.extend(Ext.form.CompositeField, {
fieldLabel: 'Airline Ticket Needed?',
layout: 'hbox',
anchor: '100%',
initComponent: function() {
this.items = [
{
xtype: 'radio',
fieldLabel: 'Label',
boxLabel: 'Yes',
name: 'TicketNeeded'
},
{
xtype: 'radio',
fieldLabel: 'Label',
boxLabel: 'No',
name: 'TicketNeeded'
}
];
MyCompositeFieldUi.superclass.initComponent.call(this);
}
});





and the preview works, but I get the error in the browser...


thanks!
md

jarrednicholls
18 Jun 2010, 7:58 AM
I have no experienced this. Can you attached your project file perhaps? And you are simply running the xds_index.html file that is exported by your project, or are you taking the exported code and working it into your own project setup? If the latter, could you post how you are using your compositefield?

Thanks.

madirishman
22 Jun 2010, 12:07 PM
It turns out I was running 3.1.0 on the machine I was using when this happened. I updated to 3.2.1 and it works great!

Thanks,
md

jarrednicholls
23 Jun 2010, 10:47 AM
Oh gotcha, yeah CompositeField was added in the 3.2.x branch. Thanks for the notice.