Speed in setting text styles

Jim Hurley jhurley at infostations.com
Mon Oct 25 10:54:36 EDT 2004


I wish to set the textstyle of certain lines in a field to bold and 
then export the field in RTF.

I have run  through the fields to determine the line number of  these 
lines. There are about 11,000 lines and about half are to be set to 
bold.

Using:

   repeat for each item tItem in tLineNums
     set the textstyle of line tItem of field 1 to "bold" 
   end repeat

where tLineNums contains the numerical values of the line numbers of 
field 1 which are to be set to bold.

This repeat loop takes about 25 minutes on my machine.

Since you can't set the textStyle of a line in a variable, I see no 
way to speed this up. Any ideas?

Jim


More information about the use-livecode mailing list