Making clickable text links in Rev
Monte Goulding
monte at sweattechnologies.com
Sun Aug 8 22:18:49 EDT 2010
Where there's a will there's a way.
For starters look at htmlText in the dictionary. If pre-parsing the text you want to put in your field and adding the links won't work then you might try checking out the mouseText and clickText functions. For this method let's say you had a list of words that you want to link to actions. You can create a custom property set in your field uLinkWord. The keys of the set are the words. The values are the handler you want executed if the word is clicked. Then the field script is something like this:
on mouseUp
local tAction
put the uLinkWord[the clicktText] of me into tAction
if tAction <> "" then dispatch tAction
pass mouseUp
end mouseUp
If you want to use the same handler with the word as a parameter then just use a custom property with a list of words.
on mouseUp
if the clicktText is among the lines of the uLinkWords of me then dispatch linkHandler with the clicktText
pass mouseUp
end mouseUp
on linkHandler pWord
-- do what you want here
end linkHandler
On 09/08/2010, at 11:59 AM, tech1 at troutfoot.com wrote:
> Hi folks,
> I can’t find this in the docs.
>
> Let’s say there’s a scrolling field with a few thousand words.
>
> Is there a way to make some words into clickable links, as in html web
> pages, without using their position?
>
> Because the text will be lengthy, and changed at various times, I want to
> avoid things like “...set the linkText of word 35429...“
>
> Thanks,
> Sandy
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list