Substacks vs. Backgrounds

Ken Ray kray at
Tue Aug 7 15:22:30 EDT 2007

On Tue, 7 Aug 2007 12:16:12 -0400, Mikey wrote:

> Ken,
> Granted you can use backgrounds to share objects across multiple
> cards, but that isn't necessary, as you know.  I probably should have
> finished my 'dew before posting this morning.  Forget the sharing of
> objects for the moment.  For the purpose of building various
> dialogs/forms/etc., there doesn't appear to be any real advantage of
> one over the other to me, which is what brought this up in the first
> place after I discovered one of the problems I'm trying to figure out
> right now.

Ah, thanks for clarifying, Mikey. Although you can use groups to 
simulate dialogs, forms, etc., there are several advantages to 

1) They can be made modal, and thus block access to other areas of the 
program - to do this with groups would take extra coding, and would 
only block access to the same stack on which the group appears - any 
other visible stacks would still be accessible (unless you do 

2) If you have code that takes actions based on looping through 
objects, etc., you'd have to "skip over" any objects used in a group, 
whereas you wouldn't have to if you used a substack.

3) If you need to use the same form or dialog in multiple stacks, using 
a substack allows you to call the same form/dialog from all places, 
whereas if you used a group, you'd have to copy the group to the other 
stack(s) you were working with.

Now of course, if you're only using a single stack, and have no 
intentions of having other stacks in your project, then some of these 
items no longer apply, but you get the idea...

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at
Web Site:

More information about the use-livecode mailing list