speeding a handler?

Phil Davis revdev at pdslabs.net
Tue Dec 1 13:51:27 EST 2009


Hey, I'm glad it helped!

To get another slight speed increase, you can move your new line of code 
outside the repeat loop (below the loop)  - but instead of:
   replace """ with empty in tLine

It would say:
   replace """ with empty in tNewText

One time for the whole list instead of once per line.

:-)

Phil


Ton Cardona wrote:
> Thanks a lot, Phil. Your handler is as fast as lightning.
>
> I've had to add a line of code to replace quotes since they still showed in the fld:
>
> repeat for each line tLine in tText
>      if """ is in tLine -- this line contains a quote
>      then -- make the text red
>         put "<font color=#FF0000>" after char 3 of tLine -- after "<p>"
>         put "</font>" before char -4 of tLine -- before "</p>"
>      end if
>      replace """ with empty in tLine  --line added by me
>      put tLine & cr after tNewText
>   end repeat
>
> I am really very grateful.
>
> Best regards,
>
> Ton
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>   

-- 
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net




More information about the Use-livecode mailing list