我正在与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.js
和resources/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。
修改
如果我将env更改为“testing”,则新错误为:
Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: series.column
答案 0 :(得分:0)
Sencha Cmd似乎没有检测到某些xtypes并且在生成的代码中错过了这些类,我的解决方法是使用Ext.require()
来添加类。
这应该在3.0.0 Beta 2中修复,但可能会遗漏一些xtypes。