Hi,
A while ago I built a POC (Proof Of Concept) about a class
that could be used for universal ini-file configurations.
The purpose was that someone can derive a new class of this
class, add some (published) properties to it and use these
in a application.
My class just holds these properties and can save and load
them to or from an ini-file without difficult coding.
You can find this little unit at:
http://delphi-en.videoripper.org/Configurator.zip
The usage is quite simple:
- Derive your own class from TConfigurator
- Add your own variables in the private or protected section
- Tie these to properties in the published section
- In your own application create your new class and load the
properties by using LoadFromFile() and save them again using
SaveToFile().
- Destroy your class at application end.
This class can handle TStrings as well, but the code is not
thoroughly tested, so I cannot give any guarantees, but it does
work well.
If you need any example code, I will make you some, but perhaps
you will only need the unit to take a peek...
(I have only quickly commented it a bit, so ask if you need help
understanding the usage or workings.)
Greetz,
Peter.
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED]
> Behalf Of dalewolver
> Sent: Friday, May 27, 2005 6:48 AM
> To: [email protected]
> Subject: [delphi-en] accessing properties via RTTI
>
>
> For many publshed properties I can set them using SetPropValue or
> retrieve them using GetPropValue.
> But I'm having trouble figuring out what to do with a TStringlist as
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/delphi-en/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/