preOpenStack

Rob Cozens rcozens at pon.net
Sat May 8 10:10:05 EDT 2004


>  > 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?

 From your description of the problem, I presume the subStack script 
contains no preOpenStack handler of its own; so when it preOpens the 
preOpenStack message goes up the message path to the mainStack.

As JB suggested, you can modify the mainStack script to ensure it is 
the target of the message.

Another means of dealing with this is to place an "empty" preOpenStack handler:

	on preOpenStack
	end preOpenStack

in the subStack script.

This traps the preOpenStack message sent to the subStack so it is not 
passed on up the message path.

Note that if the subStack script contains no openStack, closeStack, 
closeStackRequest, etc. handlers, those messages will also be sent up 
the message path to the mainStack.
-- 

Rob Cozens
CCW, Serendipity Software Company

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)


More information about the use-livecode mailing list