Newbie - MainStack Question

Brian K. Maher plsntbreez at mac.com
Sat Jul 26 10:04:01 EDT 2003


Hi Rob,

On Saturday, July 26, 2003, at 10:36  AM, Rob Cozens wrote:

>>> I have noticed that handlers in the main stack (i.e. in the Stack 
>>> script) are automatically seen by all sub stacks.
>>>
>>> For example, an openStack handler in the main stack will be invoked 
>>> when a sub stack opens and has no openStack handler of its own.
>
> Hi Brian,
>
> There are a couple of ways around this:
>
> 1.  Put the mainStacks" openStack handler in the script of the first 
> card or first background visited when the mainStack is opened, or
>
> 2.  Put "if the name of the target is not the name of me then [pass 
> openStack/exit openStack]"
>

Wouldn't even be better to avoid these workarounds completely be simply 
using the main stack as a generic routine holder?

What would be the downside to doing this?

Thanks, Brian

P.S. Sorry if I am missing something obvious here.  :-)




More information about the use-livecode mailing list