Show Linktext on mousemove

Jeffrey Massung massung at gmail.com
Sun Jan 23 14:55:52 EST 2011


I have never experienced an error like this and I do something similar all the time in my stack. One difference between your code and my code is that I get the linkText like so:

get the linkText of the mouseCharChunk

Instead of using the mouseText. I don't know if there's a difference here in what the engine -should- do, but you may want to try the mouseCharChunk and see if that fixes your problem.

Jeff M.


On Jan 23, 2011, at 11:39 AM, Alejandro Tejada wrote:

> 
> Hi all, 
> 
> I put this script in a locked field (named "LinkedTextExample"), 
> to show the actual link text in another field (named "ActualLink"), 
> placed at the bottom of the locked field. 
> 
> But randomly this script produces an error like this: 
> 
> field "LinkedTextExample": execution error at line 2 
> (Chunk: no target found), char 57 
> 
> on mousemove 
>   if the hilite of button "ShowLinkText" and the linktext of the mousetext
> <> empty 
>   then 
>      put "Actual link is: " & the linktext of the mousetext into fld
> "ActualLink" 
>      set the textcolor of char 44 to -1 of fld "ActualLink" to blue 
>   else 
>      put empty into fld "ActualLink" 
>   end if 
> end mousemove 
> 
> Sometimes, it seems that the error is triguered by moving quickly 
> the mouse pointer over the locked field. 
> 
> Does exists a safer way to show the linked text, than using 
> a mousemove handler? 
> 
> Thanks in advance! 
> 
> Al
> -- 
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/Show-Linktext-on-mousemove-tp3232843p3232843.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list