Configuration manager writing to ini file

HMG Samples and Enhancements

Moderator: Rathinagiri

Post Reply
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Configuration manager writing to ini file

Post by mol »

I wonder if someone has to share configuration manager, which will be configurable - not specific for his application, enable to write selected setting to .ini file (or xml or any else)?
If not, Im starting such a new job.
I want to declare sections, variable in section, variable types, variable ranges and which local or private variable must be se while read from .ini file.
User avatar
serge_girard
Posts: 3166
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Configuration manager writing to ini file

Post by serge_girard »

Interesting ! Can you please explain a bit more?

Serge
There's nothing you can do that can't be done...
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Configuration manager writing to ini file

Post by mol »

I'll try prepare some code next week.
I couldn't sleep last night and I thought a lot about this topic.
But, at weekend I don't like to work :-)
User avatar
serge_girard
Posts: 3166
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Configuration manager writing to ini file

Post by serge_girard »

ok ! Have a nice weekend!

Serge
There's nothing you can do that can't be done...
trmpluym
Posts: 303
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands

Re: Configuration manager writing to ini file

Post by trmpluym »

Hi Marek,

I do not exact know what your idea is. But in some of my programs I use something like :

Code: Select all

MEMVAR cEmailType:="DefaultValue"

if !File("program.ini")
   Begin ini file ("program.ini"")
   Set Section "INVOICE" ENTRY "EmailType" To cEmailType
   End ini
else
   Begin ini file ("program.ini"")
   Get cEmailType Section "INVOICE" ENTRY "EmailType"
   End Ini
endif
And I use a menu item to change the settings:

Code: Select all

EXECUTE FILE GetStartUpFolder() + '\' + 'Program.ini'
Theo
Post Reply