1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    7
    Vote Rating
    0
    CubicMushroom is on a distinguished road

      0  

    Default Unanswered: Pre-loading app data

    Unanswered: Pre-loading app data


    Hi there,

    I'm building an app & using a local storage store for some of the data.

    I woud like to pre-load the store when the app originally loads, but then uses the data in local storage in future use of the app.

    I have attempted to use the 'load' callback to check if there is any data present after load, & the load the defaults if not, however the check for whether the data exists seems to not see the data in initial app load. Each time I load the app it adds another copy of the default data set. Can anyone help me understand what I'm doing wrong?

    Source code can be found here... http://pastebin.com/Ht3N9NhF

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Answers
    3541
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You shouldn't override the load method, you need to use the load event
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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
    Jul 2012
    Posts
    7
    Vote Rating
    0
    CubicMushroom is on a distinguished road

      0  

    Default


    OK, will do, but any hints on how I solve my problem about pre-loading data?

Thread Participants: 1

Tags for this Thread