[Gambas-user] Private settings file question
bsteers4 at gmail.com
Sat Dec 5 17:05:32 CET 2020
You example does not "Write" any settings, it only tries to read them.
varTest01 = confFile["UserPreferences/ImageFilesPath", strImageFilesPath]
confFile["UserPreferences/ImageFilesPath"] = varTest01
On Sat, 5 Dec 2020 at 11:27, KKing <kicking177 at gmail.com> wrote:
> So I want to have a private application configuration file in a set
> location of my choosing (i.e. not in ~/.config/Gambas)
> A simplified test of what I attempted is below but does not appear to work.
> There is no conf file to start with (I want to have a UI to request the
> settings to save)
> When I run the below, there are no errors, but there is no conf file is
> created either?
> > Dim confFile As Settings
> > Dim strConfFile as String
> > Dim strImageFilesPath as String
> > Dim varTest01 as Variant
> > strConfFile = "/home/user01/TestSettings.conf"
> > confFile = New Settings(mCore.gstrConfFile)
> > strImageFilesPath = confFile["UserPreferences/ImageFilesPath", Null]
> > If IsNull(strImageFilesPath) Then
> > strImageFilesPath = "/media/external01/Images"
> > varTest01 = confFile["UserPreferences/ImageFilesPath",
> > strImageFilesPath]
> > Endif
> > confFile.Save
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User