[Gambas-user] settings.read()

gambas at ...1938... gambas at ...1938...
Wed Oct 15 18:00:15 CEST 2008


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. Same with format of the parsed config file. Values in string format has 
to be in dopple quotes, like this:
Key = "Value"

BTW: Settings() is a really cool function, saved me 40 lines of my own code in 
perl, respectively a perl module! :-))))

Erhm....what's about improving the docs???  *cover&hide* :-)

Greetz
Stevie





More information about the User mailing list