Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #11
    Sencha User
    Join Date
    May 2011
    Location
    Toronto, Canada
    Posts
    5
    Vote Rating
    0
    GregXII is on a distinguished road

      0  

    Default


    Hm, you're right. With an empty set, you get this error: "Start (0) was greater than end (-1)". Shouldn't be too hard to work around though.

    Otherwise, if you have even one row in the set, it works fine, as long as you are returning the correct totalProperty along with your data.

  2. #12
    Ext JS Premium Member stevil's Avatar
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045
    Vote Rating
    9
    stevil will become famous soon enough

      0  

    Default


    Yeah, Aaron says it's gonna be looked at - the other thing is, it's debug code - look at the comments in the source.

    stevil

  3. #13
    Sencha User
    Join Date
    May 2011
    Location
    Toronto, Canada
    Posts
    5
    Vote Rating
    0
    GregXII is on a distinguished road

      0  

    Default


    In the meantime, this override might help:

    Code:
               Ext.override(Ext.data.Store, {
                    onGuaranteedRange: function() {
                        var me = this,
                            totalCount = me.getTotalCount(),
                            start = me.requestStart,
                            end = ((totalCount - 1) < me.requestEnd) ? totalCount - 1 : me.requestEnd,
                            range = [],
                            record,
                            i = start;
    
                        if (start > end) {
                            me.guaranteedStart = start;
                            me.guaranteedEnd = undefined;
                            me.totalCount = undefined;
                        }
                        else if (start !== me.guaranteedStart && end !== me.guaranteedEnd) {
                            me.guaranteedStart = start;
                            me.guaranteedEnd = end;
    
                            for (; i <= end; i++) {
                                record = me.prefetchData.getByKey(i);
                                //<debug>
                                if (!record) {
                                    Ext.Error.raise("Record was not found and store said it was guaranteed");
                                }
                                //</debug>
                                range.push(record);
                            }
                            me.fireEvent('guaranteedrange', range, start, end);
                            if (me.cb) {
                                me.cb.call(me.scope || me, range);
                            }
                        }
    
                        me.unmask();
                    }
                });
    I've got it working with this. It handles the empty data set as long as the totals are being passed.

  4. #14
    Sencha User
    Join Date
    Dec 2010
    Posts
    2
    Vote Rating
    0
    vasyap is on a distinguished road

      0  

    Exclamation


    Yes, I am also getting these strange "it was guarantee" errors, here's my configuration:
    PHP Code:
    var _store Ext4.create('Ext.data.DebugStore', {
        
    model'Project',
        
    pageSize40,
        
    remoteSorttrue,
        
    bufferedtrue,
        
    proxy: {
            
    type'ajax',
            
    url'/projects/stats',
            
    extraParams: {
                
    project_projectId,
                
    datebegindateBegin,
                
    dateenddateEnd
            
    },
            
    reader: {
                
    root'records',
                
    totalProperty'count'
            
    }
        },
        
    // autoLoad: true,
                
        
    folderSorttrue,
        
    sorters: ['name'],
                
        
    simpleSortModetrue
    });
    _store.guaranteeRange(039);
    _grid Ext4.create('Ext.grid.Panel', {
        
    width: $('project_' _projectId '_grid').getSize().x// using it with MochaUI
        
    height: $('project_' _projectId '_grid').getSize().y,// and gray theme
        
    renderTo'project_' _projectId '_grid',
        
    collapsiblefalse,
        
    cls'x4-nlg',
        
    framefalse,
        
    border0,
        
    store_store,

        
    // also, the summary feature does not work as expected with buffered/paging grids
        //features: [summary],
        
    verticalScrollerType'paginggridscroller',
        
    loadMasktrue,
        
    disableSelectiontrue,
        
    invalidateScrollerOnRefreshfalse,
        
    columnsthis._columns
    }); 
    With this config and dataset with 200 rows, when I scroll down the grid to its end and then scroll back up to begin, I get "it was guarantee" error (for record with index 1) and infinite loading progress.

  5. #15
    Sencha User
    Join Date
    Jan 2010
    Posts
    30
    Vote Rating
    0
    new is on a distinguished road

      0  

    Default


    I have the same issue. I want to handle it but I meet another problem, When I load my store, in its load event I check if there is count or not then set guaranteeRange. Actingg like this cover "Start (0) was greater than end (-1) error" but "too much recursion" apears in console!
    PHP Code:
      eventGridStore.load();
        
    eventGridStore.on("load", function(){
        if (
    eventGridStore.getTotalCount() == 0) {
                
    Ext.MessageBox.show({
                        
    title'Information',
                        
    msg:'No event!',
                        
    icon 'ext-mb-info',
                        
    buttonsExt.MessageBox.OK
                
    });
        }else{
                
    eventGridStore.guaranteeRange(0ps-1);
        }
        }); 

  6. #16
    Sencha User
    Join Date
    May 2011
    Location
    Toronto, Canada
    Posts
    5
    Vote Rating
    0
    GregXII is on a distinguished road

      0  

    Default


    new, this is happening because guaranteeRange IS a load action! When you call guaranteeRange, it enters the load event, and calls guaranteeRange again, and again, and again, etc.

    Instead of calling eventGridStore.load(), use eventGridStore.guaranteeRange(0, ps-1). No need for the load event listener.

  7. #17
    Ext JS Premium Member stevil's Avatar
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045
    Vote Rating
    9
    stevil will become famous soon enough

      0  

    Default


    This workaround should get us to the next release:

    PHP Code:
    Ext.Error.handle = function (err) {
        if (
    err.sourceMethod == "onGuaranteedRange") {
            return 
    true;
        }
    }; 
    stevil

  8. #18
    Sencha User
    Join Date
    Jan 2010
    Posts
    30
    Vote Rating
    0
    new is on a distinguished road

      0  

    Default


    Quote Originally Posted by GregXII View Post
    Instead of calling eventGridStore.load(), use eventGridStore.guaranteeRange(0, ps-1). No need for the load event listener.
    then when there is no data the famous error appears

  9. #19
    Ext JS Premium Member stevil's Avatar
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045
    Vote Rating
    9
    stevil will become famous soon enough

      0  

    Default


    Quote Originally Posted by new View Post
    then when there is no data the famous error appears
    @new, try my fix in the post preceding yours - it worked well for me!

    stevil

  10. #20
    Sencha User
    Join Date
    Jan 2010
    Posts
    30
    Vote Rating
    0
    new is on a distinguished road

      0  

    Default


    ok thanks I'll try and inform you

Similar Threads

  1. Replies: 9
    Last Post: 28 Nov 2012, 3:00 AM
  2. [FIXED] Buffered Store with infinite grid - scrolling issues
    By gctram in forum Ext:Bugs
    Replies: 14
    Last Post: 8 May 2012, 6:32 AM
  3. [OPEN-EXTJSIV-207] Mixins issues
    By LesJ in forum Ext:Bugs
    Replies: 3
    Last Post: 21 Mar 2011, 12:58 PM
  4. [OPEN-EXTJSIV-205] Numeric axis issues
    By vdan in forum Ext:Bugs
    Replies: 1
    Last Post: 20 Mar 2011, 11:21 PM
  5. Replies: 1
    Last Post: 20 Aug 2010, 10:34 PM

Thread Participants: 9

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