Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-6136 in a recent build.
  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2008
    Location
    Phoenix, AZ
    Posts
    628
    Vote Rating
    10
    zombeerose will become famous soon enough zombeerose will become famous soon enough

      0  

    Default [4.1.0] Treepanel LoadMask: cannot call method 'hasCls' of null

    [4.1.0] Treepanel LoadMask: cannot call method 'hasCls' of null


    REQUIRED INFORMATION

    Ext version tested:
    • Ext 4.1.0 GA
    Browser versions tested against:
    • Chrome 18
    DOCTYPE tested against:
    • Strict
    Description:
    • Loading a tree will fail with an uncaught exception when a loadmask is defined for a treepanel.
    • This currently relies upon an override to enable loadMask support for tree panels. See forum post.
    Steps to reproduce the problem:
    • Run the code.
    The result that was expected:
    • No error and a loadMask should appear when the tree is refreshed.
    The result that occurs instead:
    • The process dies.
    Test Case:
    Code:
    //BUG: http://www.sencha.com/forum/showthread.php?198341-4.1-Loading-mask
    Ext.define('Ext.view.AbstractViewOverride',{
        override: 'Ext.view.AbstractView',
        
        onRender: function() {
            var me = this;
            me.callOverridden(arguments);
            if (me.loadMask && Ext.isObject(me.panel.store)) {
                me.setMaskBind(me.panel.store);
            }
        }
    });
    
    
        var store = Ext.create('Ext.data.TreeStore', {
            proxy: {
                type: 'ajax',
                url: '/includes/library/extjs/ext/examples/tree/get-nodes.php'
            },
            root: {
                text: 'Ext JS',
                id: 'src',
                expanded: true
            },
            folderSort: true,
            sorters: [{
                property: 'text',
                direction: 'ASC'
            }]
        });
    
    
        var tree = Ext.create('Ext.tree.Panel', {
            loadMask: true,
            store: store,
            renderTo: Ext.getBody(),
            height: 300,
            width: 250,
            title: 'Files',
            useArrows: true,
            dockedItems: [{
                xtype: 'toolbar',
                items: [{
                    text: 'Refresh',
                    handler: function(){
                        store.load();
                    }
                }]
            }]
        });

    HELPFUL INFORMATION

    Additional CSS used:
    • only default ext-all.css
    Operating System:
    • WinXP Pro
    Debugging already done:
    • In Ext.view.AbstractView#onMaskBeforeShow, the "all" collection is cleared before displaying the mask.
    • The value of the "loading" field changes when the response is received, which triggers a call to Ext.view.Table#onUpdate.
    • The "all" collection is used in Ext.view.Table#onUpdate to look up the oldRow reference but will return null because the collection was cleared when the mask was shown.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1