[lazarus] TStrings problem

Baeseman, Cliff Cliff.Baeseman at greenheck.com
Wed Jun 2 13:38:58 EDT 1999

Here is one problem that I ran across lately with the TStrings object.

Code to duplicate the error goes something like this.

string1: TStrings;
string2: TStrings;
inif: TIniFile;

procedure buggy;

  string1 := TStringList.Create;
  string2 := TStringList.Create;
  inif := TIniFile.Create('/etc/test.ini');

  inif.ReadSection('UNITS',string2);      <----the second reference to a
TStrings always segs?


This same problem seems to occur any time I reference more than one TStrings
at a time. It also happens when passing
a TStrings object to a property or passing to a procedure and or a reference
to a global TStrings object.

this is while using the H and I switches and objfpc....

This I can hack around but it would be nice if fixed. I would really like to
use the TIniFile unit.


- "If you kiss me, I'll turn into a beautiful princess."
- "Look, I'm a computer programmer. I don't have time for girls,
but a talking frog is very very cool."

More information about the Lazarus mailing list