Results 1 to 6 of 6

Thread: About Store of TouchStyle Example

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    9
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,422
    Vote Rating
    1271
      0  

    Default

    It's no where. That line needs to be removed.
    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
    Mar 2012
    Posts
    2
    Vote Rating
    0
      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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,422
    Vote Rating
    1271
      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 @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.

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    2
    Vote Rating
    0
      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
      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
                });
            }
        },*/

Tags for this Thread

Posting Permissions

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