Speeding a handler?
Ton Cardona
toncardona at mac.com
Tue Dec 1 09:51:56 EST 2009
I have a text field with 5.729 lines. 826 of them, those containing quotes, must appear coloured in red so the instruction would be:
put 0 into x
repeat for each line aLine of fld someFld
add 1 to x
if quote is in aLine then
set the forecolor of line x of fld someFld to "red"
replace quote with empty in line x of fld someFld
end if
end repeat
The problem is it takes 55 seconds.
I have reduced this time to 33 seconds by recording previously the numbers of the lines to be coloured and storing them in a customProp, yet it still takes 33 seconds.
Does anyone know a faster way of performing this task?
Thanks in advance,
Ton
More information about the use-livecode
mailing list