preOpenCard inside behaviors, does it works?

DunbarX at aol.com DunbarX at aol.com
Tue Jun 22 16:42:34 EDT 2010


No, as long as there is no preOpenCard handler in the card(s), the stack 
will get it, and then it will send it along to the button as per its (the 
stack's) behavior. Normal message hierarchy.

This is essential if the initialization is required when opening other 
cards in the stack as well. If it is only for the first card, then set the 
behavior of the card, not the stack.

On another note, I think the lack of behavior fields in the inspector is a 
missing feature, rather than a bug, no?

Craig

In a message dated 6/22/10 3:50:11 PM, mwieder at ahsoftware.net writes:


> Here's a better answer: set the behavior of the *card*, not the
> *stack*. The preOpen and Open messages are actually sent to the first
> card in the stack, so they don't get trapped by the stack behavior. I
> still think this is a bug, but setting the card behavior makes
> things... er... behave.
> 



More information about the use-livecode mailing list