Hybrid View

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3138 in a recent build.
  1. #1
    Sencha Premium Member robboerman's Avatar
    Join Date
    Nov 2007
    Location
    Pijnacker, the Netherlands
    Posts
    70
    Vote Rating
    5
    robboerman is on a distinguished road

      0  

    Default Ext.dataview.DataView creates multiple loadmasks

    Ext.dataview.DataView creates multiple loadmasks


    Hi,

    Say we have a List using a store that remotely loads a lot of records. If I call load on the store and then call load again before the first load has completed the List is never unmasked. The reason for this is that the List creates a new LoadMask instance in onBeforeLoad. When the store's load is called again, the List's onBeforeLoad again creates a new LoadMask. When the store finishes loading the List's mask is removed by calling setMasked(false). This however only removes the last created mask.

    This can be fixed by checking if a mask already exists in onBeforeLoad

    Code:
    Ext.override(Ext.dataview.DataView,{
    			onBeforeLoad: function() {
    		        var scrollable = this.getScrollable();
    		        if (scrollable) {
    		            scrollable.getScroller().stopAnimation();
    		        }
    
    		        var loadingText = this.getLoadingText();
    		        if (loadingText && !this.getMasked()) {
    		            this.setMasked({
    		                xtype: 'loadmask',
    		                message: loadingText
    		            });
    
    		            //disable scorlling while it is masked
    		            if (scrollable) {
    		                scrollable.getScroller().setDisabled(true);
    		            }
    		        }
    
    		        this.hideEmptyText();
    		    }
    		});
    Rob Boerman

    Appoint solutions BV
    Delft, the Netherlands
    Blog: appointsolutions.com/blog

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,677
    Vote Rating
    749
    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. Probably doesn't happen too often but could see it happening.
    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.

  3. #3
    Sencha Premium Member robboerman's Avatar
    Join Date
    Nov 2007
    Location
    Pijnacker, the Netherlands
    Posts
    70
    Vote Rating
    5
    robboerman is on a distinguished road

      0  

    Default


    Well, in the app we are building at the moment we are filtering a remote store containing 32k records using a realtime searchbox, every time a char is typed the filter is adjusted and a new load of the store is triggered. When typing fairly fast this happens very often.
    Rob Boerman

    Appoint solutions BV
    Delft, the Netherlands
    Blog: appointsolutions.com/blog

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    8
    TommyMaintz will become famous soon enough

      0  

    Default


    The best way to fix this is to make sure a container can never have two masks. The bug is that in applyMasked in Container we expect the currentMask to be passed as the second argument, which isnt the case for config apply methods (only for the update methods).

    The following override will fix your case and all other double mask cases

    Code:
    Ext.override('Ext.Container.MaskFix', {
        override: 'Ext.Container',
    
        applyMasked: function(masked) {
            var isVisible = true,
                currentMask;
    
            if (masked === false) {
                masked = true;
                isVisible = false;
            }
    
            currentMask = Ext.factory(masked, Ext.Mask, this.getMasked());
    
            if (currentMask) {
                this.add(currentMask);
                currentMask.setHidden(!isVisible);
            }
    
            return currentMask;
        }
    });
    Thanks for your report.

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