adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WG: Re: [Adonthell-devel] Configuration file support


From: ksterker
Subject: WG: Re: [Adonthell-devel] Configuration file support
Date: Tue, 27 Apr 2004 12:46:46 +0200

Von: Sasha Kushnirenko <address@hidden>

> XML may be a good choice for anything that is a tree-like structure. 
> What is bad is that you no longer can edit config file by hand (well you can
> but when XML complexity grows it is hard).

True. However, I think only few people would want to edit the config file 
manually. And those people that want to, should know have no problem to edit an 
XML file.

One large benefit of in-game editing of configuration options is that they can 
take immediate effect.


> I think XML is a way to go,
> but some editing tool (preferably simple, perhaps text-based) can be a of
> great value to troubleshoot serious misconfigurations when nothing 
> starts,even nice windows for editing configuration options.

Hm ...

I am thinking about the following: whenever reading a configuration setting 
from the config manager fails, the module in question must provide a sensible 
default value to the config manager.

That means, even if the config manager could load only half the configuration 
(or none at all), all the different modules would tell it what options they 
expect to find.

So when the startup process is complete, the config manager has a complete set 
of configuration options that can in turn be edited with the GUI. This system 
is much like the one v0.3 uses, with one major difference: in v0.3, all config 
stuff was centralized in the prefs class. With v0.4, the 'intelligence' 
involved will be moved to the individual modules, while the config manager just 
provides the interface to the physical config file.


So if the different modules know safe defaults, it will always be possible to 
return to a working config file. And best of all, this will be entirely 
transparent to the user.

Kai





reply via email to

[Prev in Thread] Current Thread [Next in Thread]