Two features I don't understand

Richard Gaskin ambassador at fourthworld.com
Fri Oct 31 12:52:26 EDT 2014


Dr. Hawkins wrote:
 > so does styledText even have a purpose any more?  Should it
 > be treated as deprecated?

It seems it serves a very different purpose than htmlText.  It's a new 
addition and folks find it useful, so I wouldn't expect it to be deprecated.


Trevor DeVore wroteL
 > I use styled text all of the time in my text editors and exporters.
 > Mainly for modifying runs of text and for converting text to other
 > formats. Two examples:
 > ...

Good stuff - thanks for that, Trevor.  I figured it was useful, I just 
needed to see how.



Ali Lloyd wrote:
 > Regarding id caching, I had an idea that one might be able to use
 > it to emulate the performance gain of a 'repeat for each...' style
 > structure on controls.
 >
 > Referencing a control by number or name will iterate through the
 > controls of the card until it gets to the specified one. Thus a
 > loop of the form
 >
 > repeat with x = 1 to the number of controls of this card
 >   // do something with control x
 > end repeat
 >
 > could in theory be speed up by using
 >
 > repeat for each line tId in the controlIDs of this card
 >   // do something with control id tID
 > end repeat
 >
 > However I haven't yet tried to measure any actual performance
 >  difference, and I think it would only be faster if there were
 > a large number of controls.

Alex's test suggests it needs a very large number of controls or a very 
high number of iterations, but being a performance fiend I certainly 
don't mind any optimizations that offer a speed boost, even a minor one.

I can appreciate why this is limited to IDs, because they're seldom 
modified, but since I so rarely use them I have to ask: has the team 
considered caching other control references, perhaps purging the cache 
when the control's name or number is modified?



Tom Bodine wrote:
 > Overall, the field control of LC is far more powerful than the
 > fields offered in Director and Flash (and probably other tools),
 > so there are competitive reasons to maintain and promote these
 > features in LC.

Amen to that, brother.  Hardly a week goes by that I don't hear, "Wow - 
you can do that in LiveCode?  Cool!"


-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list