Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1923 in a recent build.
  1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    212
    Vote Rating
    4
    bweiler is on a distinguished road

      0  

    Default [B2] Ext.plugin.ListPaging plugin breaks store.load() loading mask.

    [B2] Ext.plugin.ListPaging plugin breaks store.load() loading mask.


    The ListPaging plugin disables the loading mask during a store.load(). If the following code is commented out, the loading mask works fine. The testing was done using the Ajax proxy.

    Controller:
    Code:
    		userList.query('list')[0].setPlugins({
    			xclass: 'Ext.plugin.ListPaging', // Reference plugin by class
    			autoPaging: false // Use a button instead of auto loading
    		});

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Vote Rating
    751
    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.

  3. #3
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Not quite sure I understand - the list paging plugin is supposed to do that so that the list is still interactive while it's fetching more data...
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  4. #4
    Sencha User
    Join Date
    Apr 2011
    Posts
    212
    Vote Rating
    4
    bweiler is on a distinguished road

      0  

    Default


    It is my understanding from looking at the plugin code that the plugin only gets invoked when the user scrolls to the bottom of a list. The problem I am seeing is with the initial store load. The loading mask no longer appears during the initial store load if the plugin is specified. When I comment out the plugin, the loading mask appears normally.

    I understand the loading mask is not displayed while fetching subsequent pages, but it looks odd to have a blank list for 10 seconds with no spinner on initial store load when the view is first displayed.

  5. #5
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Ah ok, I'll look into that today. Thanks for the report
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  6. #6
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Hmm http://dev.sencha.com/deploy/sencha-...s/pullrefresh/ seems to work correctly - can you provide a test case where it does not?
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  7. #7
    Sencha User
    Join Date
    Apr 2011
    Posts
    212
    Vote Rating
    4
    bweiler is on a distinguished road

      0  

    Default


    It's not possible for me to provide a working test case, but I'll look at the code in the example you posted and my code to see if I can narrow down the problem and get back to you on this.

  8. #8
    Sencha User
    Join Date
    Apr 2011
    Posts
    212
    Vote Rating
    4
    bweiler is on a distinguished road

      0  

    Default Test Case

    Test Case


    Here you go. The problem occurs when you switch from autoLoad to store.load().

    Code:
    // This utility function takes a date and returns a representation in words.
    var timeAgoInWords = function(date) {
        try {
            var now = Math.ceil(Number(new Date()) / 1000),
                dateTime = Math.ceil(Number(new Date(date)) / 1000),
                diff = now - dateTime,
                str;
    
    
            if (diff < 60) {
                return String(diff) + ' seconds ago';
            } else if (diff < 3600) {
                str = String(Math.ceil(diff / (60)));
                return str + (str == "1" ? ' minute' : ' minutes') + ' ago';
            } else if (diff < 86400) {
                str = String(Math.ceil(diff / (3600)));
                return str + (str == "1" ? ' hour' : ' hours') + ' ago';
            } else if (diff < 60 * 60 * 24 * 365) {
                str = String(Math.ceil(diff / (60 * 60 * 24)));
                return str + (str == "1" ? ' day' : ' days') + ' ago';
            } else {
                return Ext.Date.format(new Date(date), 'jS M \'y');
            }
        } catch (e) {
            return '';
        }
    }
    
    
    /**
     * This examples illustrates the 'List Paging' and 'Pull Refresh' plugins
     */
    Ext.setup({
        requires: [
            'Ext.data.Store',
            'Ext.List',
            'Ext.plugin.ListPaging',
            'Ext.plugin.PullRefresh',
            'Ext.data.proxy.JsonP'
        ],
    
    
        icon: 'icon.png',
        phoneStartupScreen:  'phone_startup.png',
        tabletStartupScreen: 'tablet_startup.png',
    
    
        onReady: function() {
    
    
            Ext.define('TweetModel', {
                extend: 'Ext.data.Model',
    
    
                config: {
                    fields: ['from_user', 'profile_image_url', 'text', 'created_at'],
    
    
                    proxy: {
                        type: 'jsonp',
                        url: 'http://search.twitter.com/search.json',
    
    
                        pageParam: 'page',
                        limitParam: 'rpp',
    
    
                        extraParams: {
                            q: 'sencha'
                        },
    
    
                        reader: {
                            type: 'json',
                            rootProperty: 'results'
                        }
                    }
                }
            });
            
            Ext.define('TweetStore', {
                extend: 'Ext.data.Store',
    
    
                config: {
                    //fields: ['from_user', 'profile_image_url', 'text', 'created_at'],
                    model: 'TweetModel',
                    
                    pageSize: 5,
                    //autoLoad: true,
                }
            });
    
    
            var store = Ext.create('TweetStore');
            
            Ext.define('TweetList', {
                extend: 'Ext.List',
    
    
                config: {
                    store: store, //Ext.create('TweetStore'),
                    limit: 5,
                    disableSelection: true,
    
    
                    plugins: [
                        { xclass: 'Ext.plugin.ListPaging' },
                        { xclass: 'Ext.plugin.PullRefresh' }
                    ],
    
    
                    emptyText: '<p class="no-searches">No tweets found matching that search</p>',
    
    
                    itemTpl: Ext.create('Ext.XTemplate',
                        '<img src="{profile_image_url}" />',
                        '<div class="tweet">',
                        '<span class="posted">{[this.posted(values.created_at)]}</span>',
                        '<h2>{from_user}</h2>',
                        '<p>{text}</p>',
                        '</div>',
                        {
                            posted: timeAgoInWords
                        }
                    )
                }
            });
    
    
            if (Ext.os.is.Phone) {
                Ext.create('TweetList', {
                    fullscreen: true
                });
            } else {
                Ext.Viewport.add({
                    xclass: 'TweetList',
                    width: 380,
                    height: 420,
                    centered: true,
                    modal: true,
                    hideOnMaskTap: false
                }).show();
                store.load();
            }
        }
    });

  9. #9
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Ok I've got this isolated and fixed for the next release. If you want to try out the patch you'll need to update your local ListPaging.js init function to look like this:

    Code:
    init: function(list) {
        var scroller = list.getScrollable().getScroller(),
            store    = list.getStore();
    
    
        this.setList(list);
        this.setScroller(scroller);
        this.bindStore(list.getStore());
    
    
        // We provide our own load mask so if the Store is autoLoading already disable the List's mask straight away,
        // otherwise if the Store loads later allow the mask to show once then remove it thereafter
        if (store.getAutoLoad()) {
            list.setLoadingText(null);
        } else {
            store.on({
                load: {
                    single: true,
                    fn: function() {
                        list.setLoadingText(null);
                    }
                }
            });
        }
    
    
        // The List's Store could change at any time so make sure we are informed when that happens
        list.updateStore = Ext.Function.createInterceptor(list.updateStore, this.bindStore, this);
    
    
        if (this.getAutoPaging()) {
            scroller.on({
                scrollend: this.onScrollEnd,
                scope: this
            });
        }
    },
    And if you're using PullRefresh.js on the same page you'll need to update its init function too:

    Code:
    init: function(list) {
        var me = this,
            store = list.getStore(),
            pullTpl = me.getPullTpl(),
            element = me.element,
            scroller = list.getScrollable().getScroller();
    
    
        me.setList(list);
        me.lastUpdated = new Date();
    
    
        list.insert(0, me);
    
    
        // We provide our own load mask so if the Store is autoLoading already disable the List's mask straight away,
        // otherwise if the Store loads later allow the mask to show once then remove it thereafter
        if (store.getAutoLoad()) {
            list.setLoadingText(null);
        } else {
            store.on({
                load: {
                    single: true,
                    fn: function() {
                        list.setLoadingText(null);
                    }
                }
            });
        }
    
    
        pullTpl.overwrite(element, {
            message: me.getPullRefreshText(),
            lastUpdated: me.lastUpdated
        }, true);
    
    
        me.loadingElement = element.getFirstChild();
        me.messageEl = element.down('.x-list-pullrefresh-message');
        me.updatedEl = element.down('.x-list-pullrefresh-updated > span');
    
    
        me.maxScroller = scroller.getMaxPosition();
    
    
        scroller.on({
            maxpositionchange: me.setMaxScroller,
            scroll: me.onScrollChange,
            scope: me
        });
    },
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  10. #10
    Sencha User
    Join Date
    Jan 2012
    Posts
    27
    Vote Rating
    0
    passion4code is on a distinguished road

      0  

    Default


    Applied patch to my copy of sencha-touch-debug-all.js and received a "bindStore is not a method on that object". Working out of a copy that we don't have yet?

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