Hello forum,

I have a component that extends Ext.ux.Wizard. It has 4 steps, and a listener on its store that listens for a 'created' event. When the store is done with the ajax request (success), it fires the 'created' event. Here's the listener defition:

this.store.addListener('created', this.destroyWizard ,this);

This is defined in the initCompoent func of my MyWizard wizard component (created using Ext.extend).

Here's a snippet of the MyWizard component:

Code:
MyWizard= Ext.extend(Ext.ux.Wizard, {
  initComponent : function() {
    Ext.apply(this, {
      id: 'MyWizard',
      border:false,
      width:600, height:400,
      mandatorySteps: 4, // at least two steps are required
      // the panels (or "cards") within the layout
      items: [{
        id: 'mailing_date_form',
 //(.......... snip ...........)
    MyWizardd.superclass.initComponent.call(this);
    Ext.ComponentMgr.get('available_daily_file_form').getSelectionModel().addListener('selectionchange', this.checkSelection_1, this);
    Ext.ComponentMgr.get('select_type_id').on('select', this.checkSelection_2, this);
    this.store.addListener('created', this.destroyWizard  ,this);
    this.on({
      'activate': {
//(.............. snip ............)
The destroyWizard func:

destroyWizard: function() {
this.findParentByType('my_new_wizard_window').destroy();
}

This works fine the first time the event is triggered. However, when I open the wizard again after it has been destroyed once, it doesn't get destroyed, and the following error is raised:

Traceback:

Code:
anonymous()ext-all-remote.js (line 94)
anonymous()ext-all-remote.js (line 59)
anonymous()ext-base...remote.js (line 9)
anonymous()ext-all-remote.js (line 154)
anonymous()ext-all-remote.js (line 59)
anonymous()ext-base...remote.js (line 9)
anonymous()ext-all-remote.js (line 65)
anonymous()ext-all-remote.js (line 77)
anonymous()ext-all-remote.js (line 59)
anonymous()ext-base...remote.js (line 9)
anonymous()ext-all-remote.js (line 65)
anonymous()ext-all-remote.js (line 77)
anonymous()ext-all-remote.js (line 78)
anonymous()ext-all-remote.js (line 59)
anonymous()NewNorma...252562389 (line 213)
anonymous()ext-all-remote.js (line 13)
anonymous()ext-all-remote.js (line 13)
anonymous()Mailing....252562389 (line 59)
anonymous(function(), Object data=Object baseParams=Object paramNames=Object, [Object id=ext-gen673, Object form=Object options=Object response=Object 0=Object 1=Object], Object name=delay)ext-base...remote.js (line 9)
anonymous()ext-all-remote.js (line 136)
anonymous()ext-all-remote.js (line 142)
anonymous(function(), Object form=Object options=Object response=Object, [Object tId=15 status=200 statusText=OK, Object scope=Object timeout=90000000 0=Object 1=Object], Object name=delay)ext-base...remote.js (line 9)
anonymous()CustomCo...252562388 (line 299)
anonymous(Object conn=XMLHttpRequest tId=15, Object scope=Object argument=Object timeout=90000000, Object name=E)ext-base...remote.js (line 10)
anonymous()ext-base...remote.js (line 10)


[IMG]chrome://firebug/content/blank.gif[/IMG]Ext.Editor=function(B,A){this.field=B;Ex...d=null}});Ext.reg("editor",Ext.Editor);\n
Does anyone know why this happens?

Any suggestions appreciated

Thanks,

Marcelo.