我有两个选择来创建商店并在我的应用程序中使用它,但是我无法决定哪一个是最好的,或者是为什么:我可以使用:
Ext.regStore('CustomerList', {并使用
store:'CustomerList',和
Ext.StoreMgr.get('CustomerList') 或
HSA.stores.CustomerList = new Ext.data.Store({和使用:
HSA.stores.CustomerList哪一种是处理商店的最佳方式?为什么(在这种情况下)?干杯
杰森·罗杰斯
发布于 2011-12-20 16:50:20
我在Sencha Touch中使用MVC,并以下列方式创建/访问我的商店:
Ext.regStore('Updates', { });
var updatesStore = Ext.getStore("Updates");请注意,当我不使用MVC时,我以相同的方式创建存储,但是通过使用应用程序的命名空间来访问它,如下所示:
app.stores.updates.load();https://stackoverflow.com/questions/8577755
复制相似问题