[gtkada] configuration files
Preben Randhol
randhol at pvv.org
Wed May 29 17:24:32 CEST 2002
"Ebert, Rolf" <rolf.ebert at bms.de> wrote on 29/05/2002 (17:18) :
>
> Yes, so far I had almost never had the need to write values to a
> configuration file from within a program. I usually use Emacs for
> that :-)
Huh? How can the user of a program then change the setting. I'm not
interested in making program where the user have to be a superuser and
know how to hand-edit config files. If one is building a GUI application
this application should also provide a gui to the settings so that the
user can configure it easily. Therefore the program need to write config
files too.
> A.6: value retrieval shall not depend on the order of sections or keys
> within the configuration file
>
> OK, then what about users putting the same key twice in a config file.
> Do we stop reading after having found the first one, or do we
> completely read the file and the last one (silently) overwrites the
> previous occurences?
The program should report an error in the config file, but as others
have suggested this should be up to the developer how to deal with this.
>
> project Debug is for Object_Dir use "debug"; for Main use ("proc");
>
> package Builder is for Default_Switches ("Ada") use ("-g"); end
> Builder;
>
> package Compiler is for Default_Switches ("Ada") use
> ("-fstack-check", "-gnata", "-gnato", "-gnatE"); end Compiler; end
> Debug;
Ah ok. Too complicated for non Ada users I think.
--
Preben Randhol ------------------- http://www.pvv.org/~randhol/ --
«For me, Ada95 puts back the joy in programming.»
More information about the gtkada
mailing list