Saving Preferences
Jan Schenkel
janschenkel at yahoo.com
Wed Oct 1 04:35:01 EDT 2003
--- Ken Norris <pixelbird at interisland.net> wrote:
> Back again,
>
> Something I don't quite understand:
>
> 1) Suppose you have a Splash that contains the
> engine and initializes Prefs
> from a data stack (which I'll call a Prefs stack
> from now on).
>
> Now, when you originally create this in the Rev IDE,
> the Main stack would
> actually be the Splash, and the substacks will
> actually become Rev files at
> distr build time. Is this correct?
>
That's not really necessary : you only have to break
out the stacks that you want to save changes to ; the
other stacks can stay in the standalone.
> 2) I'll then have a substack which I'll call the UI
> stack, which is a Rev
> file after the distr build. To the user, this thing
> would look like the main
> stack because it has all the buttons, graphics,
> fields, menus, palettes,
> etc. Is this OK so far?
>
That looks like the standard way of handling it.
> 3) I'll also have a PrefDialog substack which will
> read data from the Prefs
> stack, which won't be saved in itself, but can
> operate on it while open,
> change data as appropriate, then write directly back
> to the Prefs stack,
> replacing data (save) there. Is this correct?
>
That will work just fine ; and is IMHO a better
solution than to merge the preferences UI and data
storage into a single stack.
> 4) If all the above is true, then it looks like the
> Prefs dialog should be
> another substack opened by the UI stack, correct?
>
Yes, you will have to open it in order to get to its
data ; but you can open it invisibly so nobody ever
has to know :-)
> TIA,
> Ken N.
>
Hope this helped,
Jan Schenkel.
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
More information about the use-livecode
mailing list