Hi all

I have this code :

Code:
SM.CustomerRecordsTabPanel = Ext.extend(Ext.TabPanel, {
    constructor: function(config){
        var tabExists = SM.mainPanel.find('title','Rekordy '+config.record.data.name)
        if(tabExists.length == 0)
        {

            SM.CustomerRecordsTabPanel.superclass.constructor.call(this,{
                title : 'Rekordy '+config.record.data.name,
                closable: true

            });
        }
        else
        {
            SM.mainPanel.setActiveTab(SM.mainPanel.find('title','Rekordy '+config.record.data.name));
        }
    }
});
So when the tab in SM.mainPanel exists than it opens new tab with specified title, if this tab exists than it's activating existing tab. But in else statement I got this error in firebug:

me.events is undefined
[IMG]chrome://firebug/content/blank.gif[/IMG] ce = me.events[ename],
Any ideas how to get rid of this error ?