2012年1月29日
摘要: ========== 编辑 ===========Ctrl + P 参数信息Ctrl + Q 快速查看文档Ctrl + O Override方法Ctrl + I Implement方法Ctrl + Alt + T 添加if ...else , try...catch, for, synchronized, etc 包围代码块Ctrl + / 行注释或取消行注释Ctrl + Shift + / 块注释或取消块注释Ctrl + W 层级选中代码块Ctrl + Alt + L 格式化代码Shift+Enter ... 阅读全文
posted @ 2012-01-29 21:26 leaving 阅读(206) 评论(0) 推荐(0)
摘要: 1. 使用co = coroutine.create(function() print("hi") end) --创建coroutine.status(co) -- 获取状态, suspendedcoroutine.resume(co) -- 运行coroutine.status(co) -- 获取状态, dead2.resume是在保护模式下运行的,所以错误信息是通过co的返回值来处理的co = coroutine.create(function() for i=1,2 do print("co", i) coroutine.yield() ... 阅读全文
posted @ 2012-01-29 00:06 leaving 阅读(964) 评论(0) 推荐(0)