1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    22
    Vote Rating
    0
    abram.darnutzer is on a distinguished road

      0  

    Default Unanswered: Window will now show on 1st attempt

    Unanswered: Window will now show on 1st attempt


    On a button press, I'm trying to open show a new window. On the first press of the button, nothing seems to happen. On the second press, it pops up the window as it should. I've watched to code in debug and it seems to be hitting the proper lines and there are no errors in the Developer Console. So, I end up with 2 versions of the Window created. One showing, one not.

    This will cause me issues when trying to to a component query on the items in this window, since there will be double the results.

    Here is my code to launch the window. It looks to be hitting all the code with no errors.
    Code:
    myitemwindow = new Ext.Window({
    itemId: 'MyItemEditWindow',
    minHeight: 400,
    minWidth: 600,
    layout: {
    type: 'fit'
    },
    items: [
    {
    xtype: 'myItemEdit'
    }
    ]
    });
    myitemwindow.show();
    Any help here would be greatly appreciated.

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,913
    Answers
    371
    Vote Rating
    179
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    The following worked ok for me in 4.2.1:

    Code:
    Ext.widget('button', {
        renderTo: document.body,
        text: 'Show Window',
        handler: function () {
            var myitemwindow = Ext.ComponentQuery.query('#MyItemEditWindow')[0];
    
    
            if (!myitemwindow) {
                myitemwindow = new Ext.Window({
                    itemId: 'MyItemEditWindow',
                    minHeight: 400,
                    minWidth: 600,
                    layout: {
                        type: 'fit'
                    },
                    items: [{
                        //xtype: 'myItemEdit'
                        xtype: 'panel'
                    }]
                });
            }
    
    
            myitemwindow.show();
        }
    });
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

    C
    heck out all of the 2013 SenchaCon presentations here:
    http://www.sencha.com/blog/senchacon...now-available/

  3. #3
    Sencha User
    Join Date
    May 2013
    Posts
    22
    Vote Rating
    0
    abram.darnutzer is on a distinguished road

      0  

    Default


    Thanks. This is a good way to prevent it from creating more than one window.

    I found out why the 1st one wasn't showing. There were no heights/widths set in the "myItemEdit", so it was defaulting them to zero.

    This is fixed now. Thanks for the help.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi