Messages sent while mouse is down?

hh hh at hyperhh.de
Sat Mar 11 15:06:29 EST 2017


Although there is one scenario where one has to use Mike's looping
"within"-approach (adjusted to collecting, not exiting the repeat):

If the controls in question (may be all) have some overlapping areas:
controlAtLoc((x,y)) reports only the control at (x,y) with the
highest layer.

> JLG wrote:
> You could also try controlAtLoc() which would avoid the loop.

> MB wrote:
> on mousemove
>    -- just using control number for the quick example
>    put 1 & cr & 2 into objectList 
>    if the mouse is down then
>       repeat for each line tLine  in objectList
>          if within(control tLine,the mouseloc) then
>             put tLine into tResult
>             exit repeat
>          end if
>       end repeat
>    end if
>    if tResult is not empty then
>       put tResult
>    else
>       put "no result"
>    end if
> end mousemove





More information about the use-livecode mailing list