slchorne
20 Oct 2011, 1:10 PM
I'm not sure why, but as soon as I define a toolbar (even if it isn't rendered or added to a panel) all button event handlers stop working. In the example below the button works just fine, but as soon as i define the variable 't' (at the end of the code) the button stops working.
Any thoughts ?
Ext.application({
name: 'myApp',
launch: function() {
// create the main panel
var mainPanel = Ext.create('Ext.Panel',{
layout: 'hbox',
items: [
{
xtype: 'toolbar',
docked: 'bottom',
items: [
{
xtype: 'button',
text: 'bah',
ui: 'decline',
}
]
}
]
});
// Add and render the main panel
Ext.Viewport.add( mainPanel );
}
});
// -- this def, kills all button events
var t = Ext.create('Ext.Toolbar',{
docked: 'top',
title: 'test',
items: [
{
xtype: 'button',
text: 'foo',
ui: 'decline',
}
]
});
Any thoughts ?
Ext.application({
name: 'myApp',
launch: function() {
// create the main panel
var mainPanel = Ext.create('Ext.Panel',{
layout: 'hbox',
items: [
{
xtype: 'toolbar',
docked: 'bottom',
items: [
{
xtype: 'button',
text: 'bah',
ui: 'decline',
}
]
}
]
});
// Add and render the main panel
Ext.Viewport.add( mainPanel );
}
});
// -- this def, kills all button events
var t = Ext.create('Ext.Toolbar',{
docked: 'top',
title: 'test',
items: [
{
xtype: 'button',
text: 'foo',
ui: 'decline',
}
]
});