[Lazarus] In search of a component for holding a table of strings
Lukasz Sokol
el.es.cr at gmail.com
Mon Jan 9 15:36:31 CET 2017
On 07/01/17 21:49, Bart via Lazarus wrote:
> I think my current implementation is cleaner.
> As long as you do not plan on having a table > 1000x1000 it behaves
> quite nicely IMO.
>
Right now i think, there is a shortage of standard non-visual classes that can handle
first 2 degrees of separation of data into sections in a file - by section delimiter or by line-endings;
Tables in other words.
The only component that can handle entire file of comma- or otherwise- delimited data is a TStringGrid.
But it is visual, and quite a lot of overkill for some cases - then everybody who reads a
comma-separated (or even space-separated variable-length (variable decimal places?) sub-strings
ends up not using a TStringList, but inventing iterating over sub-strings with a temporary TStringList every time...
(who says you never want to use LCL Classes unit in a console program, really ?)
While if the TStringTable was to expose every row (or col) in the table as another TStringList, as requested,
interfacing with that (even loading directly into and from a TStringGrid when needed for display) would be so much easier.
For such usage, it is rather assumed that NO substring can contain EOL of any kind,
EOL is assumed to be meaning end of a string here. Not unlike TStringList assuming EOL to mean end of a string.
YMMV but I hope some of this makes sense ;)
> Bart
>
-L.
More information about the Lazarus
mailing list