1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    73
    Vote Rating
    -1
    bstras21 is an unknown quantity at this point

      0  

    Default Best way to destroy and recreate pop up?

    Best way to destroy and recreate pop up?


    I have a popup that contains an xtype and it works the first time but when I try to use it again after I destroy it, it's not recognized. I saw some posts on initComponent but I am using touch2 pr2. What is the best solution for this?

    Code:
    if (!popup) {var popup = Ext.create('Ext.Panel', {
       fullscreen: true,
       id:'mainPopup',
       layout: 'card',
       items:[{
           xtype: 'PunchType'
     },{
       xtype:'panel',
       docked:'bottom',
       id:'listPanelButtons',
       items:[{
          xtype: 'button',
          id: 'saveBtnPunch',
          handler: function(){
              localStorage.clear();
    }
    },{
     xtype: 'button',
    id: 'cancelBtnPunch',
    handler: function(){
       popup.destroy();
    }
    }],
    },{
    docked: 'top',
     id:'topPopup',
     html: description
                                    }]
                                //}                 
                            });
                        }

  2. #2
    Sencha User
    Join Date
    Nov 2010
    Posts
    73
    Vote Rating
    -1
    bstras21 is an unknown quantity at this point

      0  

    Default Figured out the issue

    Figured out the issue


    I am using touch2 pr3 and it seems that destroying the popup and recreating it changes the id of the component.

    For instance my id looks like this:

    id: 'testID'

    and it works the first time then when I destroy it and recreate it, I look in the inspector and see this:

    id: '"ext-container-11"'

    Looks like this is a bug.

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar