Results 1 to 5 of 5

Thread: Sync() not removing items from localstorage

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1154 in a recent build.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Location
    Len, Spain
    Posts
    77
    Vote Rating
    3
      0  

    Default Sync() not removing items from localstorage

    REQUIRED INFORMATIONversion tested:
    • Sencha Touch 2 PR2
    Browser versions tested against:
    • Chrome 15.0.874.121
    DOCTYPE tested against:
    • <!DOCTYPE html>
    Description:
    • sync() not removing items from localstorage
    Steps to reproduce the problem:
    • Add 2 items to localstorage
    • Remove the items
    The result that was expected:
    • 0 items in localstorage
    The result that occurs instead:
    • 2 items in localstorage
    Test Case:
    Code:
       Ext.define('Search', {
                extend: 'Ext.data.Model',
                fields: ['id', 'query']
            });
    
    
            //our Store automatically picks up the LocalStorageProxy defined on the Search model
            var store = Ext.create('Ext.data.Store', {
                model: "Search",
                proxy: {
                    type: 'localstorage',
                    id  : 'test-Searches'
                }
            });
    
    
            //loads any existing Search data from localStorage
                store.getProxy().clear();
                store.load();
                console.log("total items:"+store.getCount()); // 0 items..ok.
                
                store.add({query:'query 1'});
                store.sync();
                store.add({query:'query 2'});
                store.sync();
                store.removeAt(0);
                store.sync();
                store.removeAt(0);
                store.sync();
                console.log("total items:"+store.getCount()); // 0 items..ok.
    
    
                store.load();
                console.log("total items:"+store.getCount()); // 2 items ...aargh
    HELPFUL INFORMATIONDebugging already done:
    • none
    Possible fix:
    • not provided
    Additional CSS used:
    • only default ext-all.css
    • custom css (include details)
    Operating System:
    • Windows 7 Enterprise 64

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
      0  

    Default

    Thank you for the report.

    Sencha Inc

    Jamie Avins

    @jamieavins

  3. #3
    Sencha User SunboX's Avatar
    Join Date
    Mar 2010
    Posts
    238
    Vote Rating
    28
      0  

    Default

    Same here:

    http://www.sencha.com/forum/showthre...emove-anything. (info required)

    greetings Sunny

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    11
      0  

    Default

    This has been fixed as part of the next Touch 2.0 release. Thanks for the report!

  5. #5
    Sencha User
    Join Date
    Nov 2011
    Location
    Len, Spain
    Posts
    77
    Vote Rating
    3
      0  

    Default

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •