extract every code out of stack

Geoff Canyon geoffc at inspiredlogic.com
Tue May 30 23:26:25 EDT 2006


On May 30, 2006, at 11:38 AM, Claus Dreischer wrote:

> It was my understanding, that the preOpenStack message is only sent  
> to the (sub)stack that is going to open, not that it's going to the  
> (main)stack that triggered the opening of the (sub)stack too (and  
> all other substacks without an own preOpenStack handler).

Any message will pass up the hierarchy until some object handles it.  
The preOpenStack message is delivered first to the first card in  
whatever stack is opening. That's the substack in this case.

If not handled, the message goes to the substack.

If not handled, the message goes to the mainstack.

If not handled, the message goes to the engine.

This ignores the possibility of frontscripts, backscripts, and stacks  
in use, which can complicate the issue further. ;-)

This is why people put the preOpenStack handler in the card script of  
the first card of the mainstack if they don't want it to be triggered  
by substacks opening.

regards,

Geoff



More information about the use-livecode mailing list