openStack called from subStack - why ?
Klaus on-rev
klaus at major.on-rev.com
Fri Apr 20 08:31:09 EDT 2012
Hi Rolf,
Am 20.04.2012 um 14:04 schrieb Rolf Kocherhans:
> Hello Jacques
>
> Thanks for your answer - but….
>
> I know about the message path and that handlers in the main stack can be used by
> all of it's substacks, I used this feature myself for many years !
>
> What puzzles me is that an openStack handler in the mainStack gets executed when
> a substack (containing NO CODE at all) is opened ?
>
> Till today I was thinking openStack handlers are a per stack thing only.
Nope, that's what the message hierarchy is all about! :-)
> I am still confused abut this :-)
If your substack(s) does not have a "pre-/openstack" (etc.) handler but its MAINSTACK does,
then the mainstacks scripts will be executed!
There are several ways to prevent this:
1. Put the (stack scpecific) "pre-/openstack" handler(s) into the script of card 1 of your stack,
it will be executed, but only for htat namely stack.
2. Add a "dummy" script in the substack(s):
on openstack
## Nada :-)
end openstack
Dito for PREOPENSTACK if neccessary...
> Cheers
> Rolf
Best
Klaus
--
Klaus Major
http://www.major-k.de
klaus at major.on-rev.com
More information about the use-livecode
mailing list