dcragg at lacscentre.co.uk
Sat May 8 04:37:35 CDT 2004
At 11:20 am +0200 8/5/04, Webmaster - Dreamscape Software wrote:
>I have a "preOpenStack" handler setup in my main stack. Everytime I open my
>substacks, the "preOpenStack" message is sent not only to the substack, but
>to the mainstack as well.
>Is this right? How do I prevent this?
It's right. A mainstack is in the message path of its substacks.
There are two common approaches to handling this.
The simple way is to put an empty (do nothing) preOpenStack handler
in the stack script of your substack.
Or you can check for "the owner of the target" in the mainstack's
preOpenStack handler. Something like this:
if the owner of the target is me then
## do your stuff here
More information about the use-livecode