Page 1 of 1

ENV: / ENVARC: handling for prefs

Posted: Sun Feb 16, 2014 10:16 am
by gazelle
I'm in the process of writing a prefs program. As it should be I want to implement the "last saved / used" and that's where the problem starts.

It's not possible with GetVar() to access the ENVARC: content if there is one in ENV:, so for "last saved" I have to go back to the filesystem approach.

As the main and the prefs are to separate programs, it's not possible to first do a DeleteVar() and then a GetVar() again in the prefs because that would trigger the notification in the main program.

Possible solution: Also support the flag GVF_SAVE_VAR in GetVar().

Re: ENV: / ENVARC: handling for prefs

Posted: Mon Feb 17, 2014 10:03 am
by colinw
GetVar() allows you to specify a device spec in front of the variable to specify which device root. ie: "ENVARC:foobar".
The default without specifying anything is of course, "ENV:". I'll update the autodocs.

Re: ENV: / ENVARC: handling for prefs

Posted: Mon Feb 17, 2014 7:28 pm
by gazelle
Thanks for the info, I didn't know that. A hint in the autodocs will clearly help.