stack script executes when opening substack

Mark Wieder mwieder at ahsoftware.net
Tue Sep 16 13:44:23 EDT 2008


Jim-

Tuesday, September 16, 2008, 9:45:50 AM, you wrote:

> What's up with that? I've read all the documentation I can find about
> stacks and substacks and cards and such, and none of it hints at this
> behavior.

It's nonintuitive, but the preOpenStack handler should actually be
placed in the script of the first card of the main stack rather than
in the stack script. Otherwise the preOpenStack message will filter
down from the substacks to the mainstack and be executed. Another way
to deal with this would be to put an empty preOpenStack handler in the
stack script of your substacks:

on preOpenCard
end preOpenCard

>From the docs for preOpenStack:

"Sent to the destination card when you open a stack."

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list