上一页 1 ··· 4 5 6 7 8 9 10 下一页
摘要: 把资源库->Cache->com.anscamobile.Corona_Simulator文件删除。Preferences->com.anscamobile.Corona_Simulator.LSSharedFileList.plist和com.anscamobile.Corona_Simulator.plist删除 阅读全文
posted @ 2011-11-25 15:42 superchao 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 在项目中,经常会有用户按了两下按钮导致程序反应不正常,之前用的解决办法是设置遮罩。今天遇到加入gameActivity == false判断。 阅读全文
posted @ 2011-10-20 19:31 superchao 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Corona同时移动多张图片,FPS会下降。解决方法:先创建几张,等要经过了才创建,并把移出屏幕的删除。(不然内存也会暴涨) 当移动一组图片时,在移出时删除之并在后面增加一张。会出现一卡一卡的现象。解决方法1:删除后隔500毫秒在创建(同时操作太占用CPU,才出现一卡一卡的)解决方法2:预先创建图片,然后在将其移入组中。(这种方法比较好) 阅读全文
posted @ 2011-10-07 18:13 superchao 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 在组中删除对象出现:WARNING: Attempting to set property(1) with nil所有的方法是display:remove(obj) obj = nil这也是corona推荐的方法。注释掉 obj = nil 就不会有warning 了display:remove(obj)--obj = nil 阅读全文
posted @ 2011-10-06 19:16 superchao 阅读(167) 评论(0) 推荐(0) 编辑
摘要: From:http://lua-users.org/wiki/LuaUnicodePattern MatchingLua's pattern matching facilities work character by character. In general, this will not work for Unicode pattern matching, although some things will work as you want. For example, "%u" will not match all Unicode upper case lette 阅读全文
posted @ 2011-09-22 20:42 superchao 阅读(1444) 评论(1) 推荐(0) 编辑
摘要: lua内存泄漏查证本文主要介绍某项目脚本(lua)部分内存泄漏的查证与处理过程,希望对大家有点帮助。需要说明的是,lua本身并不存在真正的内存泄漏,只是因为使用上面的原因导致无法gc,从而导致逻辑上的泄漏:)。 参考GCObject的声明可以发现,lua中的复杂数据类型变量的传递都是基于引用的。当lua从根开始gc扫描的时候,只要还有一个地方有对此变量的引用,那么这个变量就不会被collect。这种情况造成的危害取决于多大程度上依赖于引用,如果有适当的间接层/弱引用来隔离这个问题,可能问题会有所缓解。 以下是一些常见的错误引用情景: 1. 本应该local 的变量进入global空间或者mod 阅读全文
posted @ 2011-07-04 15:55 superchao 阅读(7015) 评论(1) 推荐(0) 编辑
摘要: LUA string库详解1. string库中所有的字符索引从前往后是1,2,...;从后往前是-1,-2,...2. string库中所有的function都不会直接操作字符串,而是返回一个结果s = "[abc]"string.len(s) <==返回5string.rep("abc", 2) <==返回"abcabc"string.lower("ABC") <==返回"abc"string.upper("abc") <==返回"ABC 阅读全文
posted @ 2011-06-20 10:23 superchao 阅读(63484) 评论(0) 推荐(3) 编辑
摘要: 使用Lua自带的SciTE来编辑代码,有以下快捷健,官方原版是:Keyboard commandsKeyboard commands in SciTE mostly follow common Windows and GTK+ conventions. All movement keys (arrows, page up/down, home and end) allow to extend or reduce a stream selection when holding the Shift key, and a rectangular selection when holding the 阅读全文
posted @ 2011-06-15 17:38 superchao 阅读(3480) 评论(0) 推荐(0) 编辑
摘要: 05-18 00:39:59.474: ERROR/Zygote(33): setreuid() failed. errno: 205-18 00:40:10.304: ERROR/Zygote(33): setreuid() failed. errno: 1705-18 00:40:12.074: ERROR/BatteryService(61): usbOnlinePath not found05-18 00:40:12.074: ERROR/BatteryService(61): batteryVoltagePath not found05-18 00:40:12.074: ERROR/ 阅读全文
posted @ 2011-05-18 17:25 superchao 阅读(1194) 评论(0) 推荐(1) 编辑
摘要: Could not open GPS configuration file /etc/gps.conf和CPU 占用率高 ANR错误线程当中添加了成员方法,不断的向服务器发送请求,造成CPU 资源短缺。解决方法:将成员方法移出来 放到哪里就要具体分析了 阅读全文
posted @ 2011-05-14 12:40 superchao 阅读(1165) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 下一页