防止同步加载商店 [英] prevent synchronously loading of a store

查看:214
本文介绍了防止同步加载商店的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Ext 4.1.1

I use Ext 4.1.1

我不断得到:


[Ext.Loader]同步加载'Eml.store.eml.EventSummary';考虑将Ext.require('Eml.store.eml.EventSummary')添加到Ext.onReady上面

[Ext.Loader] Synchronously loading 'Eml.store.eml.EventSummary'; consider adding Ext.require('Eml.store.eml.EventSummary') above Ext.onReady

我将商店引用添加到我的控制器首先,但是控制器没有加载到后来..所以我把它添加为需要,但没有雪茄..任何人都知道我做错了什么?

I added the store reference to my controller first, but the controller isn't loaded till later.. so I added it as 'requires' but no cigar.. Anyone got a clue what I'm doing wrong?

推荐答案

因为它在创建过程中没有得到评估,所以在将对象文字传递给define()之前创建它。

Because it doesn't get evaluated during creation, it creates the store before it ever passes the object literal to the define().

在initComponent中指定存储。

Instead, specify the store in initComponent.

这篇关于防止同步加载商店的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆