preOpenStack
Dave Cragg
dcragg at lacscentre.co.uk
Sat May 8 05:37:35 EDT 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.
on preOpenStack
end preOpenStack
Or you can check for "the owner of the target" in the mainstack's
preOpenStack handler. Something like this:
on preOpenStack
if the owner of the target is me then
## do your stuff here
end if
end preOpenStack
Cheers
Dave
More information about the use-livecode
mailing list