pixelbird at interisland.net
Wed Oct 1 01:08:01 EDT 2003
> From: "Ken Ray" <kray at sonsothunder.com>
> Subject: RE: Saving Preferences
> Date: Tue, 30 Sep 2003 14:21:48 -0500
> Organization: Sons of Thunder Software
>> What are you favorite ways of saving Preferences?
> Read in from an external file on startup; if the file doesn't exist,
> default prefs are applied inside the program an a new prefs file with
> the defaults is written out to disk. This way, if someone wants to reset
> their prefs to the defaults, all they need to do is throw away the prefs
Why throw away? Seems more laborious than just having a permanent Prefs
substack (which would become its own Prefs file when building for distr.,
right?). At startup, the splash with the engine looks at the prefs stack,
checks the mode, loads the appropriate settings where they go, and otherwise
sets up the project.
I thought about it some more. Most if not all of my intended users will not
be "Power Users", so I want to keep things obvious on their side. They will
often have lots of options available, which will be enough for them to
handle if they dig into the Prefs. This is the approximate model I came up
1) There will be a Prefs dialog with two Radio buttons for Default or Custom
modes, and all the Preference settings. It will probably look more like a
combination Prefs and Control Panel thing.
2) When you distribute the project, the "on" Radio button will initially be
"Default" and the Custom settings will initially be identical to the Default
3) The settings will be shown, but disabled, i.e. you can see what the
settings are AND that they are Default because the Radio button says so, but
you cannot change them.
4) If the user clicks the "Custom" radio button, the initial settings will
be the same as the Default, but the settings are enabled, i.e., you can
change them, PLUS Save and Cancel buttons appear.
5) After the user makes the changes they want, they must click Save or
Cancel. The Cancel button reverts the onscreen settings to reflect the
current Custom settings in the Prefs stack, which hasn't changed yet. The
Save button writes new Custom settings to reflect the current onscreen
settings to the Prefs stack. You can't switch back to Default mode nor close
the Prefs dialog without clicking one of those two buttons.
This method allows the developer to easily change the Default settings at an
I need to study the scripts posted to understand where this thing should go
in each platform.
More information about the Use-livecode