Board index » delphi » Text File Modification

Text File Modification

I need to add a line to the Delphi3.CFG file located in Delphi's Help
directory, so that I can link in my component's help file.  To do this I
need to first find the line that reads:
        "; Third-party Help"
To help me do this is there a component in the VCL that excels are
reading text files in general?  You know, one that recognizes new lines
and all?  

--
     Mike Vance

 

Re:Text File Modification


Have you tried TStringList.IndexOf('; Thrid-party Help');?  Once you get the
line number of that, you can insert a line after that.  Isn't there a more
reliable way though, since it looks like you are looking for a comment line?
The absence of the comment line should not effect the operation of Delphi,
but it would certainly effect the operation of your component's help
installation.  Maybe there is a better way of installing the help file...
--Joe

Quote
Mike Vance <mva...@lightspeed.net> wrote in message

news:MPG.10db2f7585f8e10a989701@forums.borland.com...
Quote
>I need to add a line to the Delphi3.CFG file located in Delphi's Help
>directory, so that I can link in my component's help file.  To do this I
>need to first find the line that reads:
> "; Third-party Help"
>To help me do this is there a component in the VCL that excels are
>reading text files in general?  You know, one that recognizes new lines
>and all?

>--
>     Mike Vance

Re:Text File Modification


On Fri, 11 Dec 1998 13:33:13 -0800, mva...@lightspeed.net (Mike Vance)
wrote:

Quote
>To help me do this is there a component in the VCL that excels are
>reading text files in general?  You know, one that recognizes new lines
>and all?  

TStringList handles text files easily. The LoadFromFile method reads
the entire text file into memory, and the SaveToFile method writes it
to disk.

---
Yorai Aminov (TeamB)
http://ourworld.compuserve.com/homepages/yaminov
(TeamB cannot answer questions received via email.
To contact me for any other reason remove nospam from my address)

Re:Text File Modification


TStringList -- wonderful suggestion!  Thank you!

Quote
> TStringList handles text files easily. The LoadFromFile method reads
> the entire text file into memory, and the SaveToFile method writes it
> to disk.
> ---
> Yorai Aminov (TeamB)

--
     Mike Vance

Other Threads