Results 1 to 4 of 4

Thread: pb in handling loalStorage memory

  1. #1
    Sencha Premium Member
    Join Date
    Oct 2012
    Location
    Antibes
    Posts
    93
    Answers
    7
    Vote Rating
    0
      0  

    Default pb in handling loalStorage memory

    When i display my data from the store in a list , all my items are multiplied, each time i load my app (F5)


    Code:
    var imagStore=Ext.create('Ext.data.Store', {
                            model: 'CWFSE.model.Document',// use a model
                            data: record.get('docs'), // set the store data as the doc array
                           });
          //ref to my list view
           this.getTest().setStore(imagStore);
    this code works perfectly well in 2.03 version, but in 2.1, the items are multiplied

    Someone can help me with this ? Is this a bug or something i'm doing wrong ?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    So you keep creating the store and giving it data or do you let the store load?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Feb 2011
    Location
    Dsseldorf, Germany
    Posts
    594
    Answers
    35
    Vote Rating
    33
      0  

    Default

    It does not look like the error happends in the code you posted.
    You can check your localStorage, by typing in the console: localStorage.
    Look for the localstorage you are talking about and check at which point of your app it is multiplied.

    Either you are doing an autosync, which is not working or whatever.

  4. #4
    Sencha Premium Member
    Join Date
    Oct 2012
    Location
    Antibes
    Posts
    93
    Answers
    7
    Vote Rating
    0
      0  

    Default

    thanks but i finally found that an Idproperty was missing in my Model, and i could make it work

Posting Permissions

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