您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

sencha touch2.3.1入门学习(1)

2024/4/21 22:41:35发布12次查看
1:到官网下载http://www.sencha.com/products/touch/download/,我下载最新版本2.3.1a; 二:建立文件夹目录结构如下 其他文件夹自行建立,touch-2.3是第一步官网下载解压而来。 三:编写代码: 1:index.html !doctype htmlhtmlhead meta charset=utf-8 titlew
1:到官网下载http://www.sencha.com/products/touch/download/,我下载最新版本2.3.1a;
二:建立文件夹目录结构如下
其他文件夹自行建立,touch-2.3是第一步官网下载解压而来。
三:编写代码:
1:index.html
wifiapp
2:app.js
/** * created by chongshi tan on 14-3-4. */ext.application( { name: 'wifiapp', controllers: ['wificontroller'], views: ['wifilistcontainer'], launch: function() { var wifilistcontainer = ext.create('wifiapp.view.wifilistcontainer'); ext.viewport.add(wifilistcontainer); }});
3:wifilistcontainer.js
/** * created by chonshi tan on 14-3-4. */ext.define(wifiapp.view.wifilistcontainer, { extend: 'ext.container', requires: ['ext.toolbar'], config: { items: [{ xtype: 'toolbar', docked: 'top', title: '开关列表', items: [{ xtype: 'spacer' },{ xtype: 'button', text: 'new', ui: 'action', iconcls: 'add', id: 'new-wifilist-btn' }] }] }});
4:wificontroller.js
/** * created by chongshi tan on 14-3-4. */ext.define('wifiapp.controller.wificontroller', { extend: 'ext.app.controller', launch: function() { this.callparent(); console.info(lauch); }, init: function() { this.callparent(); console.info('init'); }, config: { refs: { newwifibtn: #new-wifilist-btn }, control: { newwifibtn: { tap: 'onnewwifi' } } }, onnewwifi: function() { console.log(onnewwifi); }});
四:运行效果,火狐浏览器输入:http://localhost:63342/wifiapp/index.html
五:最后感谢
yanwushu博客教程:http://blog.csdn.net/yanwushu/article/category/1235170在他的代码上修改用最新的库做了一些改进和测试的demo,后续继续学习……
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product