PDA

View Full Version : Ext.list events: 'tap' is fine, 'activate' doesn't fire ?



GermanGuy
9 Feb 2011, 3:19 AM
Hi all,

I posted this some hours ago, but it didn't appear on the forum, so trying again. I have a list panel with events, where e.g. the 'tap'-event works fine, but the 'activate'-event doesn't fire. I have tried many combinations, checked help, examples and forum, but i did not find anywhere a working activate listener for a list.

Below my code snippet:




var demosList = new Ext.List({
xtype: 'list',
store: oStore,
itemTpl: glaDataDef[cDataDef ]['ListRowDef'],
singleSelect: true,
listeners: {
orientationchange : function( oThis, cOrient, nWidth, nHeight) {
oThis.setHeight( nHeight );
oThis.setWidth( nWidth );
},
beforeactivate: function( oThis, oPrev ) {
alert('a');
},
activate: {
element: 'body', //bind to the underlying body property on the panel
fn: function(){ alert('act'); }
},
el: {
tap: function(){ alert('tap el'); }
},
body: {
activate: function(){ alert('act body'); }
}
}
});

demosList.addListener('activate', function( oThis ) { alert('b'); });

demosList.on('activate', function( oThis ) { alert('b'); });

oPar.add( demosList );
oPar.doLayout();

I am really not aware of what I am missing, I tried a lot of different combinations one by one, anyone maybe having a good idea on this ? Maybe it is a bug ?

Thanks a lot,

Frank

tryanDLS
9 Feb 2011, 8:43 AM
Please don't double post - thread moderation is on.

GermanGuy
9 Feb 2011, 8:46 AM
Please don't double post - thread moderation is on.
..certainly agree - just when after some hours this post from me did not show up, I thought it had been lost - as 2 other posts showed up fine immediately...