PDA

View Full Version : addListener problem



lordmax
21 Aug 2009, 9:41 AM
Hi to all

I've a problem with addListener

my code:

var myPanel = new Ext.Panel({
items:[{
region: 'north'
,... some proprerties here
,items:[{
... some items here
}]

,listeners:{
afterrender: {
fn: function(){
console.log('afterrenderer');
myPanel .addListener(
'bodyresize'
,myPanel .syncSize()
);
}
}
}

I'll need to syncSize() the Panel when the browser's resized but don't work at all.
Firebug say to me that's not a function or not an element or the like.
I'd tried to rewrite it in many way that's I'm out of idea. :((
Can someone help me?
Thanks