speeding a handler?
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.
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,
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
Professional Software Development
More information about the Use-livecode