PDA

View Full Version : FieldSet.setTitle references non-existent initLegend method



westy
6 Jan 2012, 3:03 AM
Looks like this class was reworked, and not tested.

Assume the offending line can just be removed?

Cheers,
Westy

westy
6 Jan 2012, 3:06 AM
Heh, commented that out and now me.titleCmp is undefined...

My override for now:


Ext.require('Ext.form.FieldSet',
function() {
Ext.override(Ext.form.FieldSet, {
/**
* Override to remove call to non-existent method, and protect against titleCmp not being created yet:
* http://www.sencha.com/forum/showthread.php?171391-FieldSet.setTitle-references-non-existent-initLegend-method
*/
setTitle: function(title) {
var me = this;
me.title = title;
// me.initLegend();
if (me.titleCmp) {
me.titleCmp.update(title);
}
return me;
}
})
}
);