Showing linkText on mouse over

Eric Chatonet eric.chatonet at sosmartsoftware.com
Fri Feb 24 17:10:13 EST 2006


Hi Devin,

MouseWithin is sent repeatedly by the engine all 200 milliseconds but  
I would prefer to use mouseMove that is also sent all 200  
milliseconds but only if the mouse moves.
I would also prefer to segment my code to take advantage of built-in  
messages and use the linkClicked message.

So:

on mouseMove
   switch
   case the mouseText = empty
     unlock cursor
     break
   case "link" is in the textStyle of the mouseChunk
     set the cursor to hand
     lock cursor
     break
   default
     unlock cursor
   end switch
end mouseMove
---------------------------
on linkClicked
   put the linkText of the mouseText into fld "status"
end linkClicked

Le 24 févr. 06 à 18:49, Devin Asay a écrit :

> on mouseWithin
>   if the mouse is down then exit mouseWithin ## interrupt this  
> handler to pay attention to the mouse.
>   if the textStyle of the mouseText contains "link" then
>     put the linkText of the mouseText into fld "status"
>   else
>     put empty into fld "status"
>   end if
> end mouseWithin
>
> It seems to be working reliably now. Anybody know of any reason why  
> this approach might be a bad idea? Sort of like how we've been  
> encouraged not to use things like 'wait until the mouseClick'?

Best Regards from Paris,
Eric Chatonet
------------------------------------------------------------------------ 
----------------------
http://www.sosmartsoftware.com/    eric.chatonet at sosmartsoftware.com/





More information about the use-livecode mailing list