1. #1

    Default [SOLVED!] Upgrading from Ext3.1 to 3.2.0 js error: this.lastSize is undefined

    [SOLVED!] Upgrading from Ext3.1 to 3.2.0 js error: this.lastSize is undefined


    I receive this error in moving from 3.1 to 3.2.0. I've got 3 grids inside a viewport's center region, and panels in the west and east regions. I searched the forums and saw that lastSize is tied to the height/width, so I ensured I had heights and/or autoHeight:true on all my grids and panels, and I still get this error. Tried searching the docs on lastSize but couldn't find anything. Not sure what to check at this point.

    Here's my viewport, followed by the panel and grid definitions:

    PHP Code:
           var viewport = new Ext.Viewport({
                   
    id'viewport'
                
    layout:'border',
            
    statefulfalse,
                
    items:[
                    new 
    Ext.BoxComponent({ 
                        
    region:'north',
                
    hidden:true,
                        
    height:32
                    
    }),{
                        
    region:'west',
                        
    id:'west-panel',
                        
    title:'IT Central 1.0<br>' Ext.get('usrpf').dom.value ' / ' Ext.get('dividdesc').dom.value,
                        
    split:true,
                        
    width200,
                        
    height400,
                        
    minSize175,
                        
    maxSize400,
                        
    collapsibletrue,
                        
    collapsedtrue,
                        
    collapseMode'mini',
                        
    margins:'0 0 0 5',
                        
    layout:'accordion',
                        
    layoutConfig:{        
                            
    animate:true
                        
    },
                        
    items: [
                    { 
    title:'Miscellaneous'itemsmiscMenu }]
                    },
                
    centerPanel
            
    ,{
                        
    region:'east',
                        
    id:'east-wing',
                        
    title:'Maintenance',
                        
    split:true,
                        
    width400,
                        
    height400,
                        
    minSize200,
                        
    maxSize700,
                        
    collapsibletrue,
                        
    collapsedtrue,
                        
    collapseMode'mini',
                        
    margins:'0 5 0 0',
                        
    layoutConfig:{            //    Turn off to increase performance
                            
    animatefalse
                        
    }, 
                        
    layout'fit'// specify layout manager for items
                        
    items: [ eastPanel ]
                    }
                 ]
            });
    ...       
            var 
    centerPanel = new Ext.Panel({ 
                        
    region:'center',
                        
    id:'center-panel',
                        
    style: {textAlign'center'},
                        
    //title:'IT Central 1.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' + Ext.get('usrpf').dom.value + ' / ' + Ext.get('dividdesc').dom.value,
                        
    width200,
                        
    height400,
                        
    minSize175,
                        
    maxSize400,
                        
    collapsiblefalse,
                        
    collapsedMinitrue,
                        
    margins:'5 0 0 0',
                        
    layout:'accordion',
                        
    autoScroll:true,
    ...
            var 
    eastPanel = new Ext.TabPanel({
                        
    id:'eastPanel',
                
    deferredRenderfalse,
                        
    borderfalse,
                        
    activeTab:0,
                        
    autoHeighttrue,
                        
    height400,
    ...
         
    Ext.apply(this,{
          
    id'wrkEditGrid',
          
    storewrkDataStore,     // the datastore is defined here
          
    cmwrkColumnModel,      // the columnmodel is defined here
          
    plugins:[this.actionthis.expander],
          
    viewwrkGV,
          
    clicksToEdit:1,
          
    cls'centerAccordianHdr',
          
    stripeRowstrue,
          
    width850,
          
    //autoHeight: true,
          
    height400,
          
    autoScrolltrue,
          
    layout:'fit',
          
    loadMasktrue,
          
    border:false,
    ... 
    This also throws the same error:
    PHP Code:
         wrkGV.toggleGroupwrkGV.getGroupIdExt.get('weekDay').dom.value )); 

  2. #2
    Ext User
    Join Date
    Mar 2010
    Posts
    11
    Vote Rating
    0
    CodeKnocker is on a distinguished road

      0  

    Default


    Same problem here........

  3. #3

    Default


    bump...

    FYi, this also happens in another pre-v3.2 app that I tried to convert.

  4. #4

    Default


    Can somebody please help us on this? We really need an answer. It's holding up our entire upgrade to V3.2. I see other posts with this error but no solution. I suspect others are experiencing this in upgrading to V3.2.

    If ext-all-debug.js gave us more info we could possibly track this down - at least the component name that it's happening on.

  5. #5

    Default


    I figured it out from a different post that wasn't related to this at all.

    You need to override the syncHeight fnc.

    Here's the code in case anyone else run's into this problem:
    PHP Code:
        Ext.override(Ext.Panel, {
            
    syncHeight : function(){
            if(!(
    this.autoHeight || this.duringLayout)){
                var 
    last this.lastSize;
                if(
    last && !Ext.isEmpty(last.height)){
                var 
    old last.heightthis.el.getHeight();
                if(
    old != 'auto' && old != h){
                    var 
    bd this.bodybdh bd.getHeight();
                    
    Math.max(bdh old h0);
                    if(
    bdh != h){
                    
    bd.setHeight(h);
                    var 
    sz bd.getSize();
                    
    this.fireEvent('bodyresize'sz.widthsz.height);
                    }
                }
                }
            }
            }
        }); 

  6. #6
    Ext JS Premium Member Joyfulbob's Avatar
    Join Date
    Feb 2008
    Posts
    176
    Vote Rating
    1
    Joyfulbob is on a distinguished road

      0  

    Default Solution Keeps CPU Running...

    Solution Keeps CPU Running...


    So this works however now the CPU usage is running at 11-15% with the app doing nothing.

    If I comment out the code in the previous post, CPU usage goes away. So the question is, what in this code is causing the browser to keep running? We're using V3.3.1.

    PHP Code:
    Ext.override(Ext.Panel, {
            
    syncHeight : function(){
            if(!(
    this.autoHeight || this.duringLayout)){
                var 
    last this.lastSize;
                if(
    last && !Ext.isEmpty(last.height)){
                var 
    old last.heightthis.el.getHeight();
                if(
    old != 'auto' && old != h){
                    var 
    bd this.bodybdh bd.getHeight();
                    
    Math.max(bdh old h0);
                    if(
    bdh != h){
                    
    bd.setHeight(h);
                    var 
    sz bd.getSize();
                    
    this.fireEvent('bodyresize'sz.widthsz.height);
                    }
                }
                }
            }
            }
        }); 
    I tried Profile in FireBug and got this (see attachment).
    Attached Images

  7. #7
    Sencha User
    Join Date
    Aug 2011
    Posts
    1
    Vote Rating
    0
    mlbartonsr is on a distinguished road

      0  

    Default Status?

    Status?


    Did you find out why it is using cpu cycles?

  8. #8
    Ext JS Premium Member Joyfulbob's Avatar
    Join Date
    Feb 2008
    Posts
    176
    Vote Rating
    1
    Joyfulbob is on a distinguished road

      0  

    Default


    No; I don't understand Override code that much; especially if it's Ext code. I thought this was for the layout only ,and once it was rendered this code would stop executing, but I was mistaken.

  9. #9
    Ext JS Premium Member Joyfulbob's Avatar
    Join Date
    Feb 2008
    Posts
    176
    Vote Rating
    1
    Joyfulbob is on a distinguished road

      0  

    Default It's happening again...

    It's happening again...


    We're running into this again on the SyncHeight method in a grid toolbar. It's looking for a height on the toolbar; but we never define one??

    Here's the grid and toolbar code:

    PHP Code:
     var tcnEditGrid =  new Ext.extend(Ext.grid.EditorGridPanel, {

        
    initComponent: function() {
    ...
    Ext.apply(this,{       
          
    id'tcnEditGrid',
          
    storetcnDataStore,     // the datastore is defined here
          
    cmtcnColumnModel,      // the columnmodel is defined here
          
    viewtcnGV,
          
    clicksToEdit:1,
          
    stripeRowstrue,
          
    width900
          
    loadMasktrue,
          
    border:false,
          
    frame:false,
          
    statefultrue,
          
    // trackMouseOver: true,  // use??
          
    viewConfig:{emptyText:'No rows to display'},
          
    selModeltcnSelModel,
          
    tbar: [{
               
    text'Add Contacts'tooltip:'Add new Contacts'handlerthis.displayFormWindow.createDelegate(this),
               
    iconCls'add'id'tcnAddButton'
            
    },{
               
    text'Delete selected Contacts'tooltip:'Delete selected row(s)'handlerthis.confirmDeleteSITCNT.createDelegate(this),
               
    iconCls'remove'id'tcnDeleteButton'
           
    } , '-',{
               
    text'Import Contacts'tooltip:'Import Contact(s) from another Site#'handlerthis.importContacts.createDelegate(this),
               
    iconCls'copy'id'tcnCopyButton'
           
    },{
               
    text'Double-click Item to edit'xtype'tbtext'id'tcnGridInstruct'tooltip:'Double-click to edit'height25
           
    }]
            }); 
    // end of apply
            
           
    tcnEditGrid.superclass.initComponent.apply(this,arguments);
    ... 
    TypeError_this.lastSize is undefined.jpg

  10. #10
    Ext JS Premium Member Joyfulbob's Avatar
    Join Date
    Feb 2008
    Posts
    176
    Vote Rating
    1
    Joyfulbob is on a distinguished road

      0  

    Default


    bump

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