I can't get Thaddy's code to compile. There was an error in the headder I fixed. Under types Declared TStringDynArray = array of string;
unit1.pas(1678,27) Error: identifier idents no member "ToStringArray"
That's not what Thaddy meant: what you shoudl do is add the unit
Types to your uses clause, since there's where
TStringDynArray is declared.
As for
ToStringArray not being declared ... that is strange. It's declared for class TStrings (the base class) in unit
Classes and you should already have that in your uses clause; the very first, in fact, for default form units. Are you sure you're using:
AStringArray := AListBox.Items.ToStringArray;
or similar? Note that it's
Items which is an instance of a TStrings decendant, so it should have a valid (or at least declared, if from the base class)
ToStringArray method.