[gtkada] configuration files

Stephen Leake stephen_leake at acm.org
Wed May 29 02:26:01 CEST 2002


Preben Randhol <randhol at pvv.org> writes:

> 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.

Well, you can write a program that reads the list of keys from the
file (that's supported in the Windows ini API), and uses them
dynamically. Or, you can throw an exception if you see something you
don't expect. Or, you can just ignore it. Up to you.

I think the API should support reading the list of keys from the file,
to support dynamic operations like this.

-- 
-- Stephe





More information about the gtkada mailing list