stuckhere90
12-23-2008, 09:14 PM
I get the following warning when debugging
WARNING: Invalid delegate: «lz.view_$MouseTrackingTest$2Elzx_3_66 function(0)#0| trackmouse» (must accept one argument to handle {regNext: true, onidle: LzEvent, _events: LzEvent, removeCOI: Delegate for [object Object] calls [type Function] 6, coi: Delegate for [object Object] calls [type Function] 3, ...}.onidle)
mousex,mousey = 53 204
mousex,mousey = 53 204
mousex,mousey = 53 204
mousex,mousey = 53 204
mousex,mousey = 53 200
The code I am using to track the mouse is an example straight from open laszlo documentation:
Chapter 31. Input Devices and Gestures
3. Tracking the Mouse
3.1. Tracking the mouse within a single view
The code is provided below, and looks fine to me:
<canvas height="500" width="500" debug="true">
<debug y="300"/>
<view width="300" height="300" bgcolor="red" clickable="true">
<attribute name="moustracker_del" value="$once{ new LzDelegate( this, 'trackmouse' )}"/>
<handler name="onmousedown">
moustracker_del.register(LzIdle,'onidle');
</handler>
<handler name="onmouseup">
moustracker_del.unregisterAll();
</handler>
<method name="trackmouse">
Debug.write("mousex,mousey =", this.getMouse('x'),this.getMouse('y'));
</method>
</view>
</canvas>
Does anyone how to get rid of the warning...it is annoying more than anything.
Thanks!
WARNING: Invalid delegate: «lz.view_$MouseTrackingTest$2Elzx_3_66 function(0)#0| trackmouse» (must accept one argument to handle {regNext: true, onidle: LzEvent, _events: LzEvent, removeCOI: Delegate for [object Object] calls [type Function] 6, coi: Delegate for [object Object] calls [type Function] 3, ...}.onidle)
mousex,mousey = 53 204
mousex,mousey = 53 204
mousex,mousey = 53 204
mousex,mousey = 53 204
mousex,mousey = 53 200
The code I am using to track the mouse is an example straight from open laszlo documentation:
Chapter 31. Input Devices and Gestures
3. Tracking the Mouse
3.1. Tracking the mouse within a single view
The code is provided below, and looks fine to me:
<canvas height="500" width="500" debug="true">
<debug y="300"/>
<view width="300" height="300" bgcolor="red" clickable="true">
<attribute name="moustracker_del" value="$once{ new LzDelegate( this, 'trackmouse' )}"/>
<handler name="onmousedown">
moustracker_del.register(LzIdle,'onidle');
</handler>
<handler name="onmouseup">
moustracker_del.unregisterAll();
</handler>
<method name="trackmouse">
Debug.write("mousex,mousey =", this.getMouse('x'),this.getMouse('y'));
</method>
</view>
</canvas>
Does anyone how to get rid of the warning...it is annoying more than anything.
Thanks!