【问题标题】:Sencha Architect + Sencha Cmd - javascript error: e.onRedraw is not a functionSencha Architect + Sencha Cmd - javascript 错误:e.onRedraw 不是函数
【发布时间】:2023-03-26 07:27:01
【问题描述】:

我正在使用 Sencha Cmd 构建一个 Sencha Architect 项目。为此,我按照this forum post 中提到的步骤进行操作。

我创建了 Cmd 项目:

cd \path\to\sdk
sencha generate app app path\to\my\project

然后我编辑了index.html

<!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8">
    <title>fresh</title>
    <!-- <x-compile> -->
        <!-- <x-bootstrap> -->
            <script src="ext/ext-dev.js"></script>
            <script src="bootstrap.js"></script>
        <!-- </x-bootstrap> -->
        <script src="app.js"></script>
    <!-- </x-compile> -->
</head>
<body></body>
</html>

然后我运行构建:

cd path\my\project
sencha app build production

第一次抱怨Ruby,所以我安装了1.9版本,然后运行成功。

在我的生产页面中,我使用了all-classes.jsresources/app-all.css,它们都是由构建生成的。

问题是现在我有 javascript 错误:

TypeError: e.onRedraw is not a function
TypeError: b.setOwner is not a function

如何调试此过程?有什么我可以做的吗?

我正在使用 cmd 版本 3.1.2.342 和 ExtJS ext-4.2.1.883。

编辑

如果我将环境更改为“测试”,新的错误是:

Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: series.column

【问题讨论】:

    标签: extjs extjs4 sencha-architect sencha-cmd


    【解决方案1】:

    Sencha Cmd 似乎没有检测到某些 xtypes 并且在生成的代码中错过了这些类,我的解决方法是使用 Ext.require() 添加这些类。

    这应该在3.0.0 Beta 2 中修复,但可能遗漏了一些 xtypes。

    【讨论】:

    • 我知道这个答案已经过时了,但是您是否碰巧知道如何使用 Ext.require() 以及应该添加哪些库?
    猜你喜欢
    • 1970-01-01
    • 2012-10-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-11
    • 2014-12-07
    • 1970-01-01
    • 2013-01-20
    相关资源
    最近更新 更多