Don't put listeners in the config object.
Try something like this:
Code:
Ext.define('mytest.view.Windowmsg', {
extend : 'Ext.MessageBox',
xtype : 'windowmsg',
config: {
top : 20,
html : 'Click Me!',
style : 'text-align:center;background-color:#822222;color:yellow;position:absolute;bottom:20;left:0;right:0;width:80%;margin-left:10%;text-align:center;',
modal : false,
hidden : false
},
initialize: function() {
var me = this;
me.callParent();
me.getEl().on('tap', me.handleTap, me);
},
handleTap: function(e, node, opts) {
//scope is of mytest.view.Windowmsg class
}
});
A side note, in production it is much easier to maintain CSS/SASS than to dig through your javascript files and change the style config on your classes. I would get rid of the style config you have and use the cls config to the CSS name you have for all that styling.