onMouse event doesn't work?

Just tried to experiment Cocos IDE, also this is first time use v3.0-rc1

Realise all the keyboard, mouse, touch event has been updated.
Not a problem, i can learn.

Debug on the mac,
keyboard event = working.
mouse event = no response + some times give feed back of

cocos2d: if the index doesn’t exist, it is an error
cocos2d: touchesEnded or touchesCancel: size = 0

nothing fancy here, just copy it from the NewEventManagerTest.js
code as below

if ('mouse' in cc.sys.capabilities){
        cc.log("mouse");
        cc.eventManager.addListener({
	   event: cc.EventListener.MOUSE,
	   onMouseDown: function(event){
               cc.log("mouse down");
           }
        }, this);
}

Is this problem of v3.0-rc1 JS? or todo with JSB?

I have test the mouse functionality, but I can’t reproduce your problem, all works well, have the first log message “mouse” printed in your console or not?

Yes thats what wonders me.
The log “mouse” prints fine every time, but log “mouse down” never print.
I will try on simpler project to see if it works.
Its on mac OS X 10.9.4 if it matters.

I’ve just retest it again for you,
I build a fresh js project from the file menu, every setting is default.

add the to to HelloWorldLayer’s ctor:function () and right before return true;

got the log cocos2d: JS: mouse
but no log when i use mouse click in the app.

and it seems to happen only on Debug Mac, Run in browser works

hope this helps on analysis the issue, let me know if you need an upload and i can upload the project if required.

Hi, this have been confirmed to be an error of mac prebuilt-runtime.
There are two solutions:

  1. Build a custom runtime, and then debug with it
  2. Use Xcode to compile and debug

Of course we suggest the first solution, because we’d like our user to test more Code IDE and find more bugs to help it progress. :smile: Thanks for reporting this and the next version will solve this issue.

Hi, if you have a github link for the correct mac runtime, i will stay with the IDE now and possibly find more bugs for you :smile:

Hi, i tried RC1 today but it doesn’t seems to work.
Is this fix include in RC1?

I have same problem. I fixed follow :
open file : config.json
change “isLandscape”: false to “isLandscape”: true