[gtkada] configuration files
Preben Randhol
randhol at pvv.org
Tue May 28 17:58:46 CEST 2002
manuel.op.de.coul at eon-benelux.com wrote on 28/05/2002 (14:38) :
> Preben wrote:
> >The program will be writing and reading the settings files so the
> >programmer knows the order in which the data comes.
>
> We should allow for people to edit the ini file, including
> mixing up the order, IMO. If you read the file in memory and
> retrieve by key later this is not a problem. We could check
> for duplicate keys.
Hmm. OK.
>
> Or make this configurable to the programmer, choose between
> providing a default value, raising an exception, etc.
yes if you rely on hand-editing you would need a lot more flexibility
and overhead. But then I have one question what do you do when you need
to read this file:
[Program]
Name=Glosa
Version=0.5
[Fonts]
=-misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso8859-1
Norwegian=-misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso8859-1
Greek=-misc-grfixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso8859-7
Danish=-misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso8859-1
English=-misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso8859-1
German=-misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso8859-1
French=-misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso8859-1
Spanish=-misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso8859-1
Where the user can add any language she/he wants. I mean I cannot know
what he typed.
--
Preben Randhol ------------------- http://www.pvv.org/~randhol/ --
«For me, Ada95 puts back the joy in programming.»
More information about the gtkada
mailing list