Welcome, Guest. Please login or register.

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

Description:

0 Members and 5 Guests are viewing this topic.

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: Program preference standard ?
« on: June 19, 2011, 04:08:23 PM »
The only place your program should save its own prefs is in its own dir that it was run from.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: Program preference standard ?
« Reply #1 on: June 20, 2011, 03:02:11 AM »
Quote from: Piru;646218
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.
A very good explanation!

What is the defining characteristic that determines whether an app should save prefs into its own dir (Work:Apps/JoseMegaProggy/JoseMegaProggy.prefs)
vs. saving in ENVARC: and ENV:
?

I have seen some programs save prefs into S: which I really don't like.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: Program preference standard ?
« Reply #2 on: June 20, 2011, 10:05:03 AM »
@Itix
Does MorphOS support multiuser profiles?

--------------------

I generally prefer progs to keep their stuff in their own PROGDIR: because having thousands of files in ENVARC: slows down the booting process.  Of course if a prog has a real need to store stuff in ENVARC: then I am not against it.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA