Hello,
I've set up a new application with the MVC pattern and want to listen to the events of the dockedItems of window A, but in don't know how to resolve the correct references to the item in the controller.
ok here's a little example to clear things up 
The view
Code:
Ext.define('App.view.WindowA', {
extend : 'Ext.tree.Panel',
alias : 'widget.windowa',
....
initComponent : function() {
this.dockedItems = [{
dock : 'top',
xtype : 'toolbar',
items : [{
xtype : 'button',
text : 'do something',
}]
}];
this.callParent();
}
});
the controller
Code:
Ext.define('App.controller.WindowA', {
extend : 'Ext.app.Controller',
refs : [{
ref : 'windowA',
selector : 'windowa
}],
init : function() {
// Start listening for events on views
this.control({
'windowa' : {
select: this.doAnotherThing
},
'windowa dockedItem' : {
click : this.doSomething
}
})
},
doSomething : function() {
console.log("button pressed");
},
doAnotherSomething : function() {
console.log("something selected");
}
});
The problem now is when i press the button there's no output on the console and it seems that the event isn't handled by the controller. On the other hand the listening to the selection event of the windowA works fine and the console writes it's message.
How do i listen to the events of the dockedItems?
greetings seraith