MouseLeave puzzle
Jim Hurley
jhurley at infostations.com
Fri Apr 2 10:33:51 EST 2004
I have a field script:
on mouseUP
if there is no graphic "arrow" then
set the style of the templateGraphic to "line"
set the endarrow of the templateGraphic to true
set the lineSize of the templateGraphic to 2
create graphic "arrow"
end if
put the mouseLoc into line 1 of tGraphicPoints
put the clicktext into whatText
switch whatText
case "objective lens"
put 869,217 into line 2 of tGraphicPoints
break
case "ocular lens"
put 545,263 into line 2 of tGraphicPoints
break
case "focal point"
put 435,327 into line 2 of tGraphicPoints
break
default
put "" into line 2 of tGraphicPoints
break
end switch
set the points of graphic "arrow" to tGraphicPoints --Draw the arrow
wait 1 sec
end mouseUp
on mouseLeave
set the points of graphic "arrow" to ""
end mouseLeave
The puzzle is that the arrow shows for 1 second and then disappears,
even when the mouse is never moved away from the clickText, much less
out of the field. (The word pairs are linked.)
Why is the "mouseLeave" message being send?
Jim
More information about the use-livecode
mailing list