我试图在应用程序的初始化视图中获得Store,但是控制台告诉我:Object #<Object> has no method 'getStore'
我想知道如何在这个序列中得到一个存储:
- 初始化应用
- 获取用户GPS位置
- 创建商店
- 显示带有商店的视图
然后在视图中,我想调用这样的东西,如果我做了一个愚蠢的事情请纠正我:
<>之前要求:("APN.store.AppSettings"],…遗漏的东西//在条目中:项目:({itemId:"nav_home",id:"homeView",组:",标题:"家",布局:"vbox",slideButton: {selector: 'toolbar'};setingsbutton: {selector: 'toolbar'};项目:[{xtype:"articlelist",id:"latestNews",类别:"最新",feedUrlName://这里是虫子出没的地方!Ext.getStore("appSettings").getValue (Ext.getStore .getValue("appSettings")("区域"). get .home.url("菜单项"),}],},无论您在哪里创建视图,您都可以在此之前创建store并显式地将store设置为视图,以便在初始化函数执行时它将获得this.config.store
。要在应用程序初始化时获得GPS位置,您可以在Ext.application
的Launch功能中获得位置,甚至在创建商店和视图之前。如果你想在store数据加载后才创建view,你应该在store的load回调中创建view。
我希望这是你所寻找的,如果不是,请添加一些代码到你的问题,以便我们可以评论的细节