FlyingFish
28-11-2003, 03:29 PM
Hi there!
I'm slowly going crazy...
I thought it wouldn't be so difficult to implement the .ini support I asked for some days ago.
I only want to read the count property of a Tstrings object. But an access violation comes up. why?
here's the code:
procedure readcontentini;
var Ini: TIniFile;
i: integer;
begin
Ini := TIniFile.Create('inicontent.ini');
Ini.ReadSections(inisections);
for i := 0 to ((inisections.Count) - 1) do begin //<-- here
Ini.ReadSectionValues(inisections[i], inivalues);
end;
Ini.Free;
end;
inisections and inivalues are stringlists.
It looks like inisections is still empty when I want to read the count property... but when I read the ini sections into a normal string it works..
hope somebody can help me.
sven
I'm slowly going crazy...
I thought it wouldn't be so difficult to implement the .ini support I asked for some days ago.
I only want to read the count property of a Tstrings object. But an access violation comes up. why?
here's the code:
procedure readcontentini;
var Ini: TIniFile;
i: integer;
begin
Ini := TIniFile.Create('inicontent.ini');
Ini.ReadSections(inisections);
for i := 0 to ((inisections.Count) - 1) do begin //<-- here
Ini.ReadSectionValues(inisections[i], inivalues);
end;
Ini.Free;
end;
inisections and inivalues are stringlists.
It looks like inisections is still empty when I want to read the count property... but when I read the ini sections into a normal string it works..
hope somebody can help me.
sven