Threaded View

  1. #16
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    41
    Vote Rating
    0
    maksimenko is on a distinguished road

      0  

    Default


    Hello Don,

    Thanks again for your response,

    That helped!

    Using the following code worked perfectly and I'm able to test the app running in 4.1 (I've changed all my overrides to this form)
    Code:
    Ext.define('MM.patch.layout.container.Fit', {   
        override: 'Ext.layout.container.Fit',    
        
        calculate: function (ownerContext) {        
            console.log('override called');
            var me = this,
                childItems = ownerContext.childItems,
                /* begin workaround */
                //length = childItems.length,
                length = childItems !== undefined ? childItems.length : 0,
                /* end workaround */
                targetSize = me.getContainerSize(ownerContext),
                contentSize = { width: 0, height: 0 },
                i;
    
    
            for (i = 0; i < length; ++i) {
                me.fitItem(ownerContext, childItems[i], targetSize, contentSize);
            }
    
    
            if (!ownerContext.setContentSize(contentSize.width, contentSize.height)) {
                me.done = false;
            }
        }
    });
    But just to let you know, using the following code (the < 4.1 way, without the Ext.define('..', { override: ... }) don't...
    Code:
    Ext.override('Ext.layout.container.Fit', {        
          calculate: function (ownerContext) {        
                console.log('override called');
                var me = this,
                childItems = ownerContext.childItems,
                /* begin workaround */
                //length = childItems.length,
                length = childItems !== undefined ? childItems.length : 0,
                /* end workaround */
                targetSize = me.getContainerSize(ownerContext),
                contentSize = { width: 0, height: 0 },
                i;
    
    
            for (i = 0; i < length; ++i) {
                me.fitItem(ownerContext, childItems[i], targetSize, contentSize);
            }
    
    
            if (!ownerContext.setContentSize(contentSize.width, contentSize.height)) {
                me.done = false;
            }
        }
    });
    Don't know if it should be filed as a bug or not... what's even weirder is that I had an override in this old form for the ComboBox constructor and it worked fine there...

    Now that I understand the new way, I quite like it, it's cleaner and easier to include/exclude on builds.

    Thanks again for your help throughout this issue
    Last edited by maksimenko; 3 Nov 2011 at 12:35 PM. Reason: code new lines fix

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