aguerra10
5 Jan 2012, 7:03 AM
Hi,
I am trying to catch a tap event on a panel but I can't get it work. I am using Sencha Touch PR 2.
Could someone help me and let me know if I am doing anything wrong?
Thanks!!!
Here is my code:
{
xtype: 'panel',
id: 'myId',
height: 120,
layout: {
type: 'hbox',
align: 'stretch'
},
items: [
{
width: 130,
height: 120,
listeners: {
afterrender: function(c){
c.el.on('click', function(){
console.log ('click');
});
c.el.on('tap', function(){
console.log ('tap');
});
}
}
},
{
flex: 1,
height: 120,
}
]
}
I am trying to catch a tap event on a panel but I can't get it work. I am using Sencha Touch PR 2.
Could someone help me and let me know if I am doing anything wrong?
Thanks!!!
Here is my code:
{
xtype: 'panel',
id: 'myId',
height: 120,
layout: {
type: 'hbox',
align: 'stretch'
},
items: [
{
width: 130,
height: 120,
listeners: {
afterrender: function(c){
c.el.on('click', function(){
console.log ('click');
});
c.el.on('tap', function(){
console.log ('tap');
});
}
}
},
{
flex: 1,
height: 120,
}
]
}