Persistent data?
Jeanne A. E. DeVoto
jeanne at runrev.com
Sat Feb 2 05:58:01 EST 2002
At 12:14 AM -0800 2/2/2002, Ken Norris (dialup) wrote:
>I want to make some special control panels. There are a number of
>approaches, like putting it in front cards, using palette windows, etc.
>
>One of these might be using substacks. I don't entirely understand the
>concept of substacks, same problem with 'groups' as opposed to backgrounds.
>(I wish I had a visual flow layout...if I get it figured out to where I can
>do that, I'll post it. Pictures always speak louder than words for me).
I'm planning on adding pictures to the About sections - you're right,
they'll help a lot in making concepts and relationships clear. (When we
released 1.0 there wasn't a good way to include images in a field, but now
there is, so....)
Meanwhile: a substack is just a stack like any other. The differences are
that substacks are in the same file as the main stack - so you can
distribute a multi-stack application as one file rather than several - and
that a main stack's script is in the message path of its substacks. (Put a
different way, a substack's owner is its main stack.) When you double-click
a stack file or a built application, the main stack opens automatically;
you can then open the substacks with a script, or leave them closed.
You can have one main stack per file, plus as many substacks as you want.
You must have one main stack (you can't have just substacks).
>For example: Which should I do...keep the operating body in the main stack
>and make the control panels in substacks? This SEEMS like the right way, but
>I've seen some recent posts that lead me to believe the visa-versa would
>work better, though I'm not sure why.
>
>Can substacks open in a new window (different size)?
Yes. As they're stacks, they have their own window and can be displayed as
palettes, dialogs, etc.
I'd have to know more about your app to give advice about architecture, but
in general, if you're going to have multiple control-panel-like windows,
put them in substacks. Since you can have only one main stack, this makes
sense.
In fact, many people make the main stack a splash screen (since it's the
one that appears first when you double-click) and place all other windows
in substacks.
You can make it work any way you prefer, using any window as your main
stack...but some designs are easier than others so it pays to do some
thinking up front, as you're doing now, about where to put what. Remember
also that you can move stacks from file to file, so if you decide one way
now and change your mind later, you can still change the architecture.
--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
http://www.runrev.com/
Runtime Revolution Limited - Power to the Developer!
More information about the use-livecode
mailing list