LinkText

mark mitchell cowhead at mac.com
Tue Sep 10 08:27:01 EDT 2002


Jan Schenkel wrote:
>
>       set the textStyle of tChunk to "link"
>       set the linkText of tChunk to tLink
>     end if
>   end mouseUp
>
The linkText is an amazing thing, but I still don't really get it.  
Where is the info that you put in here stored?  Is it stored as a hidden 
custom property of the field?  What is amazing is that you can rearrange 
everying, and the links don't get messed up.  You can sort a field, you 
can fully edit the original linked chunk, even delete it entirely and 
retype something new there, and it will keep the same linkText.  You can 
cut and paste the linked chunk into a new location in the field, and it 
will keep the original linkText.  It also offers different colors for 
unvisited vs visited links.  And you can get a list of all the link 
texts of a field with a simple handler e.g.

repeat with i = 1 to the number of words in myfield
if the textstyle of word i of field myField is "link" then
if the textstyle of word i - 1 of field myField is not "link" then
put the linkText of word i of field myField after theList
end if
end if
end repeat

LinkText is a beautiful thing.  But how does it work?


mark mitchell
Japan





More information about the Use-livecode mailing list