Speeding a handler?

BNig niggemann at uni-wh.de
Tue Dec 1 11:26:35 EST 2009

How about something like this:

make 2 fields, field 1 has the data, field 2 will have the output

local tStartP, tEndP
on mouseUp
   put "<p>" into tStartP
   put "</p>" into tEndP
   put "" into tStartFont
   put "" into tEndFont
   put field 1 into tData
   put "" into tCollect
   put the milliseconds into tStart
   repeat for each line aLine in tData
      if quote is in aLine   then
         replace quote with "" in aLine
         put putP((tStartFont & aLine & tEndFont)) after tCollect
         put putP(aLine) after tCollect
      end if
   end repeat
   set the htmlText of field 2 to tCollect
   put the milliseconds - tStart
end mouseUp

private function putP what
   return tStartP & what & tEndP
end putP

> On Dec 1, 2009, at 9:51 AM, Ton Cardona wrote:
>> 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.

View this message in context: http://n4.nabble.com/Speeding-a-handler-tp932254p932300.html
Sent from the Revolution - User mailing list archive at Nabble.com.

More information about the use-livecode mailing list