Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User Mis63's Avatar
    Join Date
    Aug 2010
    Clermont-Ferrand, France
    Vote Rating
    Mis63 is on a distinguished road


    Default [FIXED] Invalid id for records loaded from local storage

    Sencha Touch version tested:
    • 1.0.1
    Platform tested against:
    • Safari
    • When a store using a LocalStorageProxy is loaded, its records do not contain the correct id. Instead of having the id present in the local storage, a auto generated id is assigned.
    • So next, the getId function of record and the indexOfId function of store do not behave as expected.
    Possible fix:
    • The problem seems to be in the getRecord function of WebStorageProxy class : when the record is instantiated, the id is not passed to the constructor.
    By changing the line 9204 of sencha-touch-debug.js
    record = new Model(data);
    with the below line where content in blue is added
    record = new Model(data, id);
    it works fine.

  2. #2
    Sencha User edspencer's Avatar
    Join Date
    Jan 2009
    Palo Alto, California
    Vote Rating
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough



    Thanks, I've applied your fix to the 1.0.x branch - it'll appear in the next release
    Ext JS Senior Software Architect
    Personal Blog:

Similar Threads

  1. Local Storage
    By tomalex0 in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 20 Dec 2010, 6:24 AM
  2. Saving List data to local storage
    By Akhenaten in forum Sencha Touch 1.x: Discussion
    Replies: 6
    Last Post: 19 Dec 2010, 5:36 PM
  3. [FIXED-587] Records loaded marked dirty
    By omarc in forum Sencha Touch 1.x: Bugs
    Replies: 2
    Last Post: 22 Nov 2010, 6:03 PM
  4. Replies: 2
    Last Post: 3 Jun 2010, 10:53 AM
  5. idea: local storage using Flash Shared objects
    By PromaneX in forum Community Discussion
    Replies: 0
    Last Post: 2 Jun 2008, 4:53 AM

Thread Participants: 1