rubyrain
7 Nov 2011, 10:31 AM
While I was following this guide, http://www.sencha.com/learn/architecting-your-app-in-ext-js-4-part-3/, I ran into few problems and was unable to solve them.
First of all, I downloaded Pandora app and made it work with dynamic loading.
Then, I tried to build the app and it stops with an error. (I successfully built the example in Getting Started)
Can somebody point me to the right direction on how to build an MVC app?
Also, there is a glitch in controller (still on Pandora example). In the following codes, onStationsLoad functions doesn't run after stationsStore is loaded.
onLaunch: function() {
var stationsStore = this.getStationsStore();
stationsStore.load({
callback: this.onStationsLoad,
scope: this
});
},
onStationsLoad: function() {
var stationsList = this.getStationsList();
stationsList.getSelectionModel().select(0);
},
However, the following code runs. (But I still get “Uncaught TypeError: Cannot call method ‘getSelectionModel’ of undefined”)
onLaunch: function() {
var stationsStore = this.getStationsStore();
stationsStore.load({
callback: function() {
var stationsList = this.getStationsList();
stationsList.getSelectionModel().select(0);
},
scope: this
});
},
Any idea? Anyone?
Thanks in advance.
First of all, I downloaded Pandora app and made it work with dynamic loading.
Then, I tried to build the app and it stops with an error. (I successfully built the example in Getting Started)
Can somebody point me to the right direction on how to build an MVC app?
Also, there is a glitch in controller (still on Pandora example). In the following codes, onStationsLoad functions doesn't run after stationsStore is loaded.
onLaunch: function() {
var stationsStore = this.getStationsStore();
stationsStore.load({
callback: this.onStationsLoad,
scope: this
});
},
onStationsLoad: function() {
var stationsList = this.getStationsList();
stationsList.getSelectionModel().select(0);
},
However, the following code runs. (But I still get “Uncaught TypeError: Cannot call method ‘getSelectionModel’ of undefined”)
onLaunch: function() {
var stationsStore = this.getStationsStore();
stationsStore.load({
callback: function() {
var stationsList = this.getStationsList();
stationsList.getSelectionModel().select(0);
},
scope: this
});
},
Any idea? Anyone?
Thanks in advance.