[Gambas-user] settings.read()

Benoit Minisini gambas at ...1...
Wed Oct 15 20:55:10 CEST 2008


On mercredi 15 octobre 2008, gambas at ...1938... wrote:
> Am Mittwoch, 15. Oktober 2008 00:36:10 schrieb Benoit Minisini:
> > On mardi 14 octobre 2008, gambas at ...1938... wrote:
> > > Dear List,
> > >
> > > I want to read a settings file, which is not located in the standard
> > > directory (User.Home &/ ".config/gambas" &/ Application.Name &
> > > ".conf"). Is "Seetings.Read" the right solution for this purpose? When
> > > yes, can anybody give me an example in form of a code snipplet, please?
> > >
> > > TIA
> > > Stevie
> >
> > You can specify the path of the settings in the Settings constructor.
> >
> > DIM hMySettings = NEW Settings("/path/to/my/settings.conf")
> >
> > Regards,
>
> Thanks for your help! :-)
>
> I got it working, but I think, this info has to be part of the wiki and/or
> the docu. 

This is documented in the wiki.

> Same with format of the parsed config file. Values in string 
> format has to be in dopple quotes, like this:
> Key = "Value"

The format is not documented because it can change. The rule is accessing 
settings file only with the Settings class.

Regards,

-- 
Benoit Minisini




More information about the User mailing list