Est*_*vez 1 static extjs class extjs4
如何在字符串变量中按名称访问类?我不想实例化它,只想访问它的静态变量.名称总是在变化,它是函数的传入参数.
我有这样的事情:
function someFunction (className)
{
    var myClass = *theFuncToAccessClass*(className);
    alert(myClass.staticVariable);
}
所以我正在寻找theFuncToAccessClass.有可能吗?
例:
var Clazz = Ext.ClassManager.get(className);
更新确保已加载类
Ext.require(className, function(Clazz) {
    // the callback will be passed a reference to the class constructor,
    // so you won't even need to resolve it with the ClassManager now...
    Clazz.staticProperty
});