ENV: / ENVARC: handling for prefs

This forum is for general developer support questions.
Post Reply
User avatar
gazelle
Posts: 102
Joined: Sun Mar 04, 2012 12:49 pm
Location: Frohnleiten, Austria

ENV: / ENVARC: handling for prefs

Post 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().
User avatar
colinw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 218
Joined: Mon Aug 15, 2011 10:20 am
Location: Brisbane, QLD. Australia.

Re: ENV: / ENVARC: handling for prefs

Post 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.
User avatar
gazelle
Posts: 102
Joined: Sun Mar 04, 2012 12:49 pm
Location: Frohnleiten, Austria

Re: ENV: / ENVARC: handling for prefs

Post by gazelle »

Thanks for the info, I didn't know that. A hint in the autodocs will clearly help.
Post Reply