Hi,

Andrew Haines started implementing a new TStrings descendant for use
as internal storage for fpGUI's Memo component (optimized for speed).
This got me curious as to why many developers don't use TStringList
itself.  Look around and then also at LCL's TMemo, I noticed Mattias
seems to have had the same idea, implementing his own descendant class
called TTextStrings.  Abstract from the unit (textstrings.pas) header:

----------------------
TTextStrings is a TStrings descendant that is optimized for handling
the complete text as whole (instead of as line by line as in
TStringList).
----------------------

It seems a lot of developers are not happy with TStringList.  What's
the actual downside of using TStringList for internal storage in a
text component like Memo or ListBox?  Performance?  If so, why don't
we _fix_ the implementation in TStringList itself, instead of
everybody creating their own descendants?

Yes, LCL's TMemo does currently use TStringList for internal storage,
but clearly Mattias did at some stage think of using TextStrings as
the commented code shows.

Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to