但是onTouchBegan是需要返回值的，假如返回的是true，就会响应后续的onTouchEnd方法，假如为false，则不会响应onTouchEnd。而最最重要的是假如当前Listener的_swallowsTouches为true，则onTouchBegan的返回值会觉得当前的点击是否可以传到后面的Listener                             原始邮件                             发件人: pandamicro<notifications@github.com>收件人: cocos2d/cocos2d-js<cocos2d-js@noreply.github.com>抄送: garfield_ho<garfield_ho@qq.com>发送时间: 2014年5月22日(周四) 16:14主题: Re: [cocos2d-js] Fix issue that error return from functiononTouchBegan (#400)In frameworks/js-bindings/bindings/manual/ScriptingCore.cpp:
> @@ -1076,7 +1076,19 @@ bool ScriptingCore::handleTouchEvent(void* nativeObj, cocos2d::EventTouch::Event
>          else
>          {
>              jsval retval;
> -            ret = executeFunctionWithOwner(OBJECT_TO_JSVAL(p->obj), funcName.c_str(), 2, dataVal, &retval);

Hi @HoGarfield , the ret value indicate whether the executeFunctionWithOwner have been successfully invoked. It's normally not related to the javascript return value. I don't understand why you need to do this? Can you explain more?

—Reply to this email directly or view it on GitHub.