[Gambas-user] Settings[] cannot be used statically?

T Lee Davidson t.lee.davidson at gmail.com
Thu Jan 23 20:01:56 CET 2020


The documentation[0] seems to indicate that Settings can be used statically. However, when I try to do that according to the 
examples, I get a "Null object" error.

I created an application settings (.conf) file by hand so the settings could be restored on Form_Open with:
txtUserName.Text = Settings["User/Name"]
txtUserEmail.Text = Settings["User/Email"]

That didn't work, so I tried to let the app save its own settings file on Form_Close with:
Settings["User/Name"] = txtUserName.Text
Settings["User/Email"] = txtUserEmail.Text

Both attempts gave the "Null object" error.

Is the documentation in error, or is this a bug?


-- 
Lee

Gambas v3.14.3

[0] http://gambaswiki.org/wiki/comp/gb.settings/settings


More information about the User mailing list