Welcome, Guest. Please login or register.

Author Topic: Program preference standard ?  (Read 5500 times)

Description:

0 Members and 3 Guests are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Program preference standard ?
« on: June 19, 2011, 05:18:55 PM »
Quote from: Jose;646203
if there is any standard way/place whatever to save the preferences of the program ? i.e. like the default sana device to use, packet definitions the user might want to wait for, GUI preferences ....
I realize some stuff goes into preferences directory on sys: IRC, but I think that's more like for the system oriented programs...

The standard location is ENVARC: for the saved configuration and ENV: for the currently used configuration. At boot the ENVARC: content is copied to ENV:. sys directory in this location is reserved for OS preferences.

If your application is a simple one with only need for a single file for preferences you're typically supposed to save them in a appname.prefs. If on the other hand you have several files you should use a subdir appname/file1.prefs appname/file2.prefs etc. As ENV: is stored in RAM: you should avoid storing excessive large files.

When editing settings user is presented with 3 options: Save, Use and Cancel. Save saves the settings to both ENVARC: and ENV:, and the application begins to use the selected configuration. Use saves the settings to ENV: only, and the application begins to use the selected configuration. Cancel discards any changes to the configuration and the application continues to use the old settings.