Speed in setting text styles

Mark Smith mark at maseurope.net
Mon Oct 25 13:24:54 EDT 2004


Or to avoid having to count up to n every time:

put fld tFld into tData
repeat for each line L  in tData
if [condition] then
   put "<p>" & L & "</p>" & cr after changedData  -- plain text
else
    put "<p><b>" & L & "</p></b>" & cr after changedData -- bold text
end if
end repeat
delete last char of changedData ---lose trailing cr
set the htmlText of fld tFld to changedData

On 25 Oct 2004, at 17:00, use-revolution-request at lists.runrev.com wrote:

> put fld tFld into tHTML
> repeat for each line L  in tHTML
> add 1 to n
> if [condition] then next  repeat
> replace "<p>" with "<p><b>" in line n of  tHTML
> replace "</p>" with "</b></p>" in line n of  tHTML
> end repeat
> set the htmlText of fld tFld to tHTML



More information about the use-livecode mailing list