I have this gridPanel:
Ext.define('BM.view.test.MacroList', {
extend: 'BM.view.GridPanel',
alias:'widget.macro-test-list',
store: 'Tests',
initComponent: function() {
this.columns = [
{
xtype:'actioncolumn',
width:50,
items: [
{
icon: 'images/start.png',
tooltip: 'Start Test',
handler: function(grid, rowIndex, colIndex) {
this.application.fireEvent('testStart', grid.getStore().getAt(rowIndex));
// application not defined here because 'this' is the button.
}]
}]
}
}
stratTest is a function that will be available from many places in the application, and I would like it to be used as an application wide event, but those seem to be available only from controllers.
How do I call .application.fireEvent('testStart'...)
from the handler inside this button?
I'm using this question as a constant reference to events, and the Sencha docs, but couldn't find the answer.