2014年2月22日

[DONE]ReferenceError: WebSocket is not defined pomelo

摘要: 使用cocos2d-x 3.0 + pomelo-cocos2d-jsb原因是没有注册 websocket只要在 AppDelegate.cpp 加上如下就可以了 sc->addRegisterCallback(register_jsb_websocket); 阅读全文

posted @ 2014-02-22 09:47 影语者 阅读(1195) 评论(0) 推荐(0) 编辑

2014年2月21日

[DONE]pomelo npm-install 出现 AttributeError: 'module' object has no attribute 'script_main'

摘要: 环境:Mac 10.7.4, python 2.6.7, nodejs 0.10.26, pomelo 0.8.9下载 chatofpomelo, 执行 sudo sh npm-install.sh 的时候,出现如下错误Traceback (most recent call last): File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in sys.exit(gyp.script_main())AttributeError: 'module& 阅读全文

posted @ 2014-02-21 23:09 影语者 阅读(5196) 评论(0) 推荐(0) 编辑

2014年2月13日

[ISSUE]shell 命令问题

摘要: ###对于路径中带空格的,加上引号,比如./"JS Crystal Craze Mac.app/Contents/MacOS/JS Crystal Craze Mac"如果是在遍历的路径中带有空格,如何处理http://unix.stackexchange.com/questions/9496/lo... 阅读全文

posted @ 2014-02-13 22:54 影语者 阅读(301) 评论(0) 推荐(0) 编辑

2014年2月7日

finished running <my app>” on the targeted device

摘要: mac 10.7.4 xcode4.5.2将项目的 Test-info.plist 修改为 Info.plist 后出现如标题的错误,启动不了模拟器,又是clean,又是修改armv6,armv7,又是修改bundle name...一顿乱调之后,终于可以启动模拟器了,不过模拟器里面出现了两个app,一个是正常名字,一个是显示 {PRODUCE_NAME}看来还是plist 这边修改坏了, 原来在 Build Settings 里面 有个Expand Build Settings in Info.plist File 这个设置将Info.plist 修改为回 Test-info.plist, 阅读全文

posted @ 2014-02-07 15:44 影语者 阅读(233) 评论(0) 推荐(0) 编辑

2014年1月10日

c++中64位int与字符串的转换

摘要: win32:_atoi64(char *)other platformstrtoll(char *) 阅读全文

posted @ 2014-01-10 13:27 影语者 阅读(1206) 评论(0) 推荐(0) 编辑

git 杂记

摘要: *批量添加: git add -A*只显示一行的log信息: git log --pretty=oneline*将常用的log加入alias, git config --global alias.hist 'log --pretty=format:"%h %ad | %s%d [%an]" --gr... 阅读全文

posted @ 2014-01-10 13:25 影语者 阅读(220) 评论(0) 推荐(0) 编辑

2013年12月31日

[ISSUE] json 导致在 Android 上 crash

摘要: 项目中使用到jsoncpp,在pc上开发的时候,没有问题但是在Android上,会有一定概率crash发现是在析构 std::string 的时候,已经被析构了,是std::string 为空的时候,即使执行拷贝构造,似乎也并没有像想象中的拷贝解决办法: 使用 char*替换 asString() -> asCString()在使用临时变量 Json::Reader 的时候,发现也存在这个问题解决办法: 声明一个全局的Json::Reader 这样在整个程序的生命周期里面,他都不会被析构了更详细原因,待查 阅读全文

posted @ 2013-12-31 13:13 影语者 阅读(639) 评论(0) 推荐(0) 编辑

2013年12月27日

[DONE]error: field has incomplete type 'cocos2d::LuaValue'

摘要: 环境: mac 10.7.4 xcode 4.5.2 cocos2d-x 3.0alpha1编译sample的时候,出现error: field has incomplete type 'cocos2d::LuaValue'想应该是c++11的问题本想升级xcode,但是发现又要升级系统到10.8初步想的是 前置声明的问题以往的印象:前置声明只能用来声明指针或者引用在xcode 5.0.x上实验,顺利编译通过// 2014-02-13将xcode升级到4.6.3, 不用升级系统,顺利编译运行cocos2d-x-3.0beta2 阅读全文

posted @ 2013-12-27 07:38 影语者 阅读(519) 评论(0) 推荐(0) 编辑

2013年12月25日

[ISSUE][ERROR] console - Caught exception: Error: sourceEnd out of bounds

摘要: [2013-12-25 07:51:24.420] [ERROR] console - Caught exception: Error: sourceEnd out of bounds at Buffer.copy (buffer.js:530:11) at copyArray (/Users/Tom/Desktop/github/chatofpomelo-websocket/game-server/node_modules/pomelo/node_modules/pomelo-protocol/lib/protocol.js:259:11) at Object.Packag... 阅读全文

posted @ 2013-12-25 07:54 影语者 阅读(384) 评论(0) 推荐(0) 编辑

pomelo debug: "RangeError: Maximum call stack size exceeded root"

摘要: mac 10.7.4 webstorm 7.0.2启动 game_server 的 app.js 出错原来是在控制台上运行的时候遇到过,采用root 用户正常执行解决方法:使用root权限启动webstorm 阅读全文

posted @ 2013-12-25 00:01 影语者 阅读(441) 评论(0) 推荐(0) 编辑

导航