Note that there are some explanatory texts on larger screens.

plurals
  1. POObject #<Object> has no method 'getStore' on the app init
    text
    copied!<p>I'm trying to get Store in the view on the init of the applicatoin, however the console tells me: <code>Object #&lt;Object&gt; has no method 'getStore'</code></p> <p>I'm wondering how would you get a store in this sequence:</p> <ol> <li>Initialise app</li> <li>Get user GPS location</li> <li>Create a store</li> <li>Display view with the store</li> </ol> <pre> init: function () { this.callParent(); console.log("controller init"); }, launch: function () { this.getApplicationSettings(); this.getApplicationRegionalisation(); Ext.getStore("appSettings").setValue("region", "Melbourne"); var store = Ext.create("APN.store.Locations"); var geo = Ext.create('Ext.util.Geolocation', { autoUpdate: false, listeners: { locationupdate: function(geo) { var location = store.getClosestLocation(geo.getLatitude(), geo.getLongitude()); Ext.getStore("appSettings").setValue("region", location.get("location")); }, locationerror: function(geo, bTimeout, bPermissionDenied, bLocationUnavailable, message) { } } }); </pre> <p>And then in the view I would like to call something like this, correct me if I'm doing a stupid thing:</p> <pre> requires: [ 'APN.store.AppSettings' ], ..... omitted stuff // in items: items: [ { itemId: 'nav_home', id: 'homeView', group: '', title: "Home", layout: 'vbox', slideButton: { selector: 'toolbar' }, settingsButton: { selector: 'toolbar' }, items: [{ xtype: 'articlelist', id: 'latestNews', category: 'Latest', feedUrlName: // here is the place where it bugs out! Ext.getStore("appSettings").getValue(Ext.getStore("appSettings").getValue("region").get("menuItems").home.url, } ], }, </pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload