PreOpenStack Question
Phil Davis
davis.phil at comcast.net
Thu Sep 8 20:28:36 EDT 2005
Hi Joe -
Nope, all those messages are sent through the message-passing hierarchy
whenever a stack is opened (unless messages are locked).
They are sent by the engine in this order:
preOpenStack
openStack
preOpenCard
openCard
Each messages hits the opening card first, then the stack that contains
that card. (There can be other objects in between - this is simplified)
If the opening card (card 1 by default) has handlers for all the
messages, none of the messages will make it to the stack UNLESS the
card-level handlers each end with the "pass" command. Like this:
-- card script -------------
on preOpenStack
doCardThing1
-- this message will go no further - not passed
end preOpenStack
on openStack
doCardThing2
pass openStack -- lets message continue down the path
end openStack
-- stack script ------------
on preOpenStack
-- will never be executed - msg was not passed by card script
doStackThing1
end preOpenStack
on openStack
doStackThing2 -- will always be executed
end openStack
HTH -
Phil Davis
AbilityForms at aol.com wrote:
> Hi Everyone
>
> Apparently when there is a "PreOpenStack" script the "OpenStack" script and
> the "OpenCard" scripts are ignored. Is that true? If so how can I be sure those
> scripts aren't ignored?
>
> Joe,
> Orlando, Florida
More information about the use-livecode
mailing list