Login Register

dojo.connect causes exception

Hello,

I am trying to develop a small Editor where you can draw a small set of Elements. While working on it I came accross a problem that I couldnt solve yet and I hope that someone here can help me out.
I need quite a lot listeners to make interaction work:

clickListener = dojo.connect(canvas, 'onclick', controller.click);
mouseDownListener = dojo.connect(canvas, 'onmousedown', controller.mousedown);
mouseMoveListener = dojo.connect(canvas, 'onmousemove', controller.mousemove);
mouseUpListener = dojo.connect(canvas, 'onmouseup', controller.mouseup);
mouseOverListener = dojo.connect(canvas, 'onmouseover', controller.mouseover);

When I add

mouseOutListener = dojo.connect(canvas, 'onmouseout', controller.mouseout);

to the list dojo throws the following exception:

uncaught exception: [Exception... "Could not convert JavaScript argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://localhost/seeme_web/libs/dojo/dojo/dojo.js :: anonymous :: line 3008" data: no]

When I connect the mouseout event to dojo.body there is no exception thrown.

So my question is: How can I connect the mouseout event to the desired nodes? Or can you only connect a certain number of events to a single element?

Thanks a lot in advance.

Alexander

P.S.: I get the same exception, when I try to connect the ondblclick event to the canvas element.