<div dir="ltr"><div>I currently use Settings statically without any errors.</div><div><br></div><div>Jussi<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 23, 2020 at 9:03 PM T Lee Davidson <<a href="mailto:t.lee.davidson@gmail.com">t.lee.davidson@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The documentation[0] seems to indicate that Settings can be used statically. However, when I try to do that according to the <br>
examples, I get a "Null object" error.<br>
<br>
I created an application settings (.conf) file by hand so the settings could be restored on Form_Open with:<br>
txtUserName.Text = Settings["User/Name"]<br>
txtUserEmail.Text = Settings["User/Email"]<br>
<br>
That didn't work, so I tried to let the app save its own settings file on Form_Close with:<br>
Settings["User/Name"] = txtUserName.Text<br>
Settings["User/Email"] = txtUserEmail.Text<br>
<br>
Both attempts gave the "Null object" error.<br>
<br>
Is the documentation in error, or is this a bug?<br>
<br>
<br>
-- <br>
Lee<br>
<br>
Gambas v3.14.3<br>
<br>
[0] <a href="http://gambaswiki.org/wiki/comp/gb.settings/settings" rel="noreferrer" target="_blank">http://gambaswiki.org/wiki/comp/gb.settings/settings</a><br>
<br>
----[ <a href="http://gambaswiki.org/wiki/doc/netiquette" rel="noreferrer" target="_blank">http://gambaswiki.org/wiki/doc/netiquette</a> ]----<br>
</blockquote></div>