//http://www.sencha.com/learn/sencha-class-system
var Person = new Ext.Class({
name: 'Mr. Unknown',
walk: function(steps) {
alert(this.name + ' is walking ' + steps + ' steps');
}
}); //http://docs.sencha.com/touch/2.2.1/#!/guide/class_system
//Ext.ns('My.sample');//define the namespace
Ext.define('Animal', { requires: [
'Ext.MessageBox'
], constructor: function(config) {
this.initConfig(config);
}, config: {
name: 'default name',
gender:'male'
}, speak: function() {
//alert('grunt');
Ext.Msg.alert(this.getName(), "Speaks...");
}, statics : { static1 :function(){
console.log('static fun1, called by Animail.static1');
}
}
}); console.log('launching...');
Animal.static1();
var ani=Ext.create('Animal',{name:'abc'});
console.log(ani.getName());
ani._name='zhaoyao';
console.log(ani.getName());
console.log(ani._gender);
ani.speak();

最新文章

  1. 学习ASP.NET MVC(五)——我的第一个ASP.NET MVC CURD页面
  2. Introducing shard translator
  3. 第二个Sprint冲刺第二天
  4. 使用jquery插件实现图片延迟加载技术(懒加载)
  5. angular事件代理
  6. POJ 1274 The Perfect Stall
  7. html5笔记
  8. python跟踪脚本进度(类似bash-x)
  9. SSM配置
  10. java自定义接口
  11. nutch-1.7-二次开发-Content中增加编码
  12. C/C++中define的使用
  13. POPTEST老李分享session,cookie的安全性以及区别 2
  14. 前端开发必备 40款优秀CSS代码编写工具推荐
  15. HDU1042N!大数的阶乘java模板
  16. Linux Doxygen的安装和使用
  17. 使用HAproxy如何实现web站点的动静分离
  18. EXCEPTION-javaBean
  19. EDT改成CST
  20. c#参数修饰符-out

热门文章

  1. python--while循环
  2. 反射机制及开源框架xUitls的使用,使用HttpUtils通过断点续传下载文件
  3. [Doc ID 1666646.1]如何使用功能管理员清除缓存?
  4. Linux上安装Squall
  5. Redis命令参考(Keys & String)
  6. CSS3选择器使用小结
  7. JS获取网页宽高方法集合
  8. 结果集一组数据的第几条ROW_NUMBER基本用法
  9. js实现图片滑动显示效果
  10. java中的拷贝文件FileChannel