Speeding a handler?
dam-pro.girard at laposte.net
Tue Dec 1 10:30:24 EST 2009
Did you locked the screen ?
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
Improve your code reusability with NativeDoc!
Ton Cardona a écrit :
> 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,
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode