Unix Sencha Touch生成应用程序命令:Windows
您知道如何在Windows的Sencha Touch中生成应用程序结构吗?我下载了Sencha Touch SDK并安装了它。生成应用程序的命令应为:Unix Sencha Touch生成应用程序命令:Windows,unix,command-line,sencha-touch,extjs,Unix,Command Line,Sencha Touch,Extjs,您知道如何在Windows的Sencha Touch中生成应用程序结构吗?我下载了Sencha Touch SDK并安装了它。生成应用程序的命令应为: ./sencha generate app Contacts ../contacts 首先,windows无法识别此“.”。然后我试了一下: sencha generate app Contacts ../contacts 这不做任何事情,没有错误,没有输出。我也跟着这个。但我无法让它在Windows中工作。谁能告诉我如何在Sencha To
./sencha generate app Contacts ../contacts
首先,windows无法识别此“.”。然后我试了一下:
sencha generate app Contacts ../contacts
这不做任何事情,没有错误,没有输出。我也跟着这个。但我无法让它在Windows中工作。谁能告诉我如何在Sencha Touch中生成完整的应用程序结构
关于这个主题有一个很好的视频演示。但这也没用。也许我错过了什么
有什么帮助吗?尽管该命令存在,但据我所知,它实际上还没有得到支持或记录,因此不应该期望它真正起作用。事实上,我觉得它有点过时了 如果有帮助,以下是我用来布局应用程序的一般结构: app.js
Ext.regApplication({
name: 'app',
launch: function() {
// setup main view
this.viewport = new app.ApplicationViewport();
}
});
app/views/Viewport.js
app.views.ApplicationViewport = Ext.extend(Ext.Panel,{
title: 'YourApp',
layout: 'card',
initComponent: function(){
// main view setup code
Ext.apply(this, {
items: [new app.views.YourModelViewport()]
})
// super
app.CustomersViewport.superclass.initComponent.apply(this, arguments);
}
});
app.views.YourModelViewport = Ext.extend(Ext.Panel,{
title: 'YourModel',
layout: 'card',
initComponent: function(){
// view setup code
this.html = 'A Viewport';
// super
app.CustomersViewport.superclass.initComponent.apply(this, arguments);
}
});
app/models/YourModel.js
app.models.YourModel = Ext.regModel("YourModel", {
fields: [
// field config
],
validations: [
// validation configs
],
proxy: {
// proxy configs
}
});
app/stores/YourModelStore.js
app.stores.YourModelStore = new Ext.data.Store({
model: 'YourModel'
});
app/view/YourModel/Viewport.js
app.views.ApplicationViewport = Ext.extend(Ext.Panel,{
title: 'YourApp',
layout: 'card',
initComponent: function(){
// main view setup code
Ext.apply(this, {
items: [new app.views.YourModelViewport()]
})
// super
app.CustomersViewport.superclass.initComponent.apply(this, arguments);
}
});
app.views.YourModelViewport = Ext.extend(Ext.Panel,{
title: 'YourModel',
layout: 'card',
initComponent: function(){
// view setup code
this.html = 'A Viewport';
// super
app.CustomersViewport.superclass.initComponent.apply(this, arguments);
}
});
app/controllers/YourModelController.js
Ext.regController("YourModelController", {
show: function(o) {
// some controller code
}
});
尽管该命令存在,但AFAIK它实际上还没有得到支持或文档化,因此不应该期望它真正起作用。事实上,我觉得它有点过时了 如果有帮助,以下是我用来布局应用程序的一般结构: app.js
Ext.regApplication({
name: 'app',
launch: function() {
// setup main view
this.viewport = new app.ApplicationViewport();
}
});
app/views/Viewport.js
app.views.ApplicationViewport = Ext.extend(Ext.Panel,{
title: 'YourApp',
layout: 'card',
initComponent: function(){
// main view setup code
Ext.apply(this, {
items: [new app.views.YourModelViewport()]
})
// super
app.CustomersViewport.superclass.initComponent.apply(this, arguments);
}
});
app.views.YourModelViewport = Ext.extend(Ext.Panel,{
title: 'YourModel',
layout: 'card',
initComponent: function(){
// view setup code
this.html = 'A Viewport';
// super
app.CustomersViewport.superclass.initComponent.apply(this, arguments);
}
});
app/models/YourModel.js
app.models.YourModel = Ext.regModel("YourModel", {
fields: [
// field config
],
validations: [
// validation configs
],
proxy: {
// proxy configs
}
});
app/stores/YourModelStore.js
app.stores.YourModelStore = new Ext.data.Store({
model: 'YourModel'
});
app/view/YourModel/Viewport.js
app.views.ApplicationViewport = Ext.extend(Ext.Panel,{
title: 'YourApp',
layout: 'card',
initComponent: function(){
// main view setup code
Ext.apply(this, {
items: [new app.views.YourModelViewport()]
})
// super
app.CustomersViewport.superclass.initComponent.apply(this, arguments);
}
});
app.views.YourModelViewport = Ext.extend(Ext.Panel,{
title: 'YourModel',
layout: 'card',
initComponent: function(){
// view setup code
this.html = 'A Viewport';
// super
app.CustomersViewport.superclass.initComponent.apply(this, arguments);
}
});
app/controllers/YourModelController.js
Ext.regController("YourModelController", {
show: function(o) {
// some controller code
}
});
这里的论坛上有一个windows的mod:
还请记住,在创建应用程序后,要切换到应用程序目录以发出控制器/模型/视图命令论坛上有一个windows的mod:
还请记住,在创建应用程序后,要切换到应用程序目录以发出控制器/模型/视图命令我知道这是一个非常老的问题。 但我有同样的问题,没有找到任何完整的答复。 这是我的解决办法 假设(installFolder)是您安装Sencha SDK的文件夹
希望这有帮助 我知道这是一个很老的问题。 但我有同样的问题,没有找到任何完整的答复。 这是我的解决办法 假设(installFolder)是您安装Sencha SDK的文件夹
希望这有帮助 嗨,克里斯,谢谢你的回复。我知道这个结构,我已经在使用这个应用程序结构了。但是命令本身产生了整个结构。是的,它还没有被记录,但只要我们遵循结构,它就不会过时。这真的很有用。嗨,克里斯,谢谢你的回复。我知道这个结构,我已经在使用这个应用程序结构了。但是命令本身产生了整个结构。是的,它还没有被记录,但只要我们遵循结构,它就不会过时。它真的很有用。