adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] Configuration file support


From: ksterker
Subject: Re: [Adonthell-devel] Configuration file support
Date: Mon, 26 Apr 2004 10:24:44 +0200

Von: Alexandre Courbot <address@hidden>
Datum: Montag, 26. April 2004, 10:01
Betreff: Re: [Adonthell-devel] Configuration file support

> Do I hear 'XML'? ;)

Um :) - even though XML would be nice, it means yet another library we'd depend 
on. OTOH, libxml2 is very portable, and on Linux, most people will have 
installed it anyway. So if you'd say it's okay, then I would gladly use libxml 
for our config files. But I could also live with INI-style config files and a 
parser generated with flex.
 
> Very good idea anyway. Perhaps the meta-information for displaying could
> just be the various choices available. For instance, a boolean value
> would instanciate into a checkbox, and so on...

Yeah, I thought about that too. With an .ini file, the meta-info could be part 
of a comment, like:

 [Audio]
 # Range 0 - 100
 Volume = 75

 # on or off
 SFX = on

If we'd use XML, we could have something like this:

  <section name="Audio">
    <range name="Volume" min="0" max="100">75</range>
    <bool name="SFX">1</bool>
  </section>

The more I think about it, the better I like the XML solution. Comments?

Kai






reply via email to

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