1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    9
    Vote Rating
    0
    kim2ee is on a distinguished road

      0  

    Default About Store of TouchStyle Example

    About Store of TouchStyle Example


    I am readding the source code of TouchStyle, and I find
    in the controller, store named Categories will be loaded in init function.
    Like this :
    init: function() {
    Ext.getStore('Categories').on('load', this.onStoreLoad, this);
    },

    But I am confused that I can not find onStoreLoad function, where it is?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,823
    Vote Rating
    836
    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


    It's no where. That line needs to be removed.
    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
    Mar 2012
    Posts
    2
    Vote Rating
    0
    jonathanh is on a distinguished road

      0  

    Default


    May I know where is the source code for the ST2 Touchstyle example? When i view source it shows the minified version only.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,823
    Vote Rating
    836
    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


    Quote Originally Posted by jonathanh View Post
    May I know where is the source code for the ST2 Touchstyle example? When i view source it shows the minified version only.
    When you download Senha Touch 2, unzip it and look in the examples folder for the touchstyle example.
    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.

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    2
    Vote Rating
    0
    jonathanh is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    When you download Senha Touch 2, unzip it and look in the examples folder for the touchstyle example.
    Ahh thank you! Was searching high and low through the online documentation and it didn't occur to me to look inside my own folders

  6. #6
    Sencha User
    Join Date
    Feb 2012
    Posts
    253
    Vote Rating
    0
    ci11111 is on a distinguished road

      0  

    Default


    why not doing like this rather that always calling ensureStoreLoad

    Code:
        init: function() {
            /*Ext.getStore('Categories').on('load', this.onStoreLoad, this);*/
            this.store = Ext.getStore('Categories');
            this.store.on('load', function() {
                console.log('store loaded');
                this.showRootCategory();
            }, this, {
                single: true
            });
        },
         /*ensureStoreLoad: function(action) {
            var store = Ext.getStore('Categories');
    
    
            if (store.data.all.length) {
                action.resume();
            } else {
                store.on('load', function() {
                    action.resume();
                }, this, {
                    single: true
                });
            }
        },*/