-
18 Mar 2012 10:22 PM #1
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?
-
19 Mar 2012 9:05 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,624
- Vote Rating
- 434
It's no where. That line needs to be removed.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
21 Mar 2012 12:51 AM #3
May I know where is the source code for the ST2 Touchstyle example? When i view source it shows the minified version only.
-
21 Mar 2012 4:19 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,624
- Vote Rating
- 434
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
21 Mar 2012 7:24 PM #5
-
23 Mar 2012 7:27 AM #6
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 }); } },*/


Reply With Quote
