I have a page with a toolbar on it, that is added through apply like so (abridged code, lots of irrelevant stuff in the original):
var obj = Ext.extend(Ext.Panel,{
initComponent:function(){
Ext.apply(this,{
layout:'card',
itemId:'contactDetails',
border:false,
activeItem:0,
tbar: new Ext.Toolbar({
items:[{text:'New'},{text:'Edit',id:'editButton'}]
})
});
obj.superclass.initComponent.apply(this);
}, load:function() {
this.tbar.findById('editButton').toggle(false); //Javascript error here about findById not being a function.
}
});
The above may not be syntactically correct either. It is in my code (at least to the extent that no javascript errors aside from the big one are thrown.)