Discussion:
TIniFile, ReadString, TMemo question
(too old to reply)
JoeBlow
2008-05-27 05:01:35 UTC
Permalink
I have an app that is supposed to read a TIniFile, and populate fields
on a form from the data. Everything is working fine except the TMemo
stuff. It is not a formatted memo, so no rich text or anything, BUT
there are definitely going to be carriage returns in it.

When I save the data, it goes in fine, but when I do

List[i].Description = fs->ReadString(SL-
Strings[i-1],"Description","");
It stops adding text to the TMemo on the form as soon as it hits the
first carriage return in the TIniFile. How do I get it to read in the
entire contents of this Name=Value entry, or is there a better way to
store and retrieve this data? The data is mostly single line entries
of numbers and strings, except for this one field which as I said will
definitely contain many lines of text and multiple carriage returns.

TIA
JoeBlow
2008-06-01 23:23:57 UTC
Permalink
Post by JoeBlow
I have an app that is supposed to read a TIniFile, and populate fields
on a form from the data. Everything is working fine except the TMemo
stuff. It is not a formatted memo, so no rich text or anything, BUT
there are definitely going to be carriage returns in it.
When I save the data, it goes in fine, but when I do
List[i].Description = fs->ReadString(SL-
Strings[i-1],"Description","");
It stops adding text to the TMemo on the form as soon as it hits the
first carriage return in the TIniFile. How do I get it to read in the
entire contents of this Name=Value entry, or is there a better way to
store and retrieve this data? The data is mostly single line entries
of numbers and strings, except for this one field which as I said will
definitely contain many lines of text and multiple carriage returns.
TIA
Is this the wrong place to post such a question? No reply at all
after a week makes me think so. Can someone at lease point me in the
right direction for a group to use? Thanks

Loading...