Results 1 to 4 of 4

Thread: pb in handling loalStorage memory

Hybrid View

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

    Default Unanswered: 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,326
    Answers
    3884
    Vote Rating
    1297
      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!

    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 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
  •