syntax of arguments passing from LCB to LCS
Posted: Fri Feb 12, 2016 12:27 pm
I would like my widget to detect mouse moves so that I can drag it around based on the current mouse position. I'm tying myself in knots with the syntax. The following seems close but still not working exactly right. I think it has to do with the way I am constructing the arguments in square brackets for the "post" command. Are there any docs explaining arguments and maybe with a couple of examples? Any guidance appreciated.
LCB:
public handler OnMouseMove()
private variable tPoint as Point
private variable tXPointAsString as String
private variable tYPointAsString as String
put the current click position into tpoint
put intToString(the x of tPoint) into tXPointAsString
put intToString(the y of tpoint) into tYPointAsString
post "mouseMove" to my script object with [tXPointAsString,tYPointAsString]
end handler
LCS (in the widget script directly):
on mousemove pX pY
... do some stuff with pX and pY ...
end mousemove
LCB:
public handler OnMouseMove()
private variable tPoint as Point
private variable tXPointAsString as String
private variable tYPointAsString as String
put the current click position into tpoint
put intToString(the x of tPoint) into tXPointAsString
put intToString(the y of tpoint) into tYPointAsString
post "mouseMove" to my script object with [tXPointAsString,tYPointAsString]
end handler
LCS (in the widget script directly):
on mousemove pX pY
... do some stuff with pX and pY ...
end mousemove