rcozens at pon.net
Wed Feb 6 11:48:01 EST 2002
>How do I set a clean-up operation to work when a stack is first
>opened, but not when I change to another stack such as a substack or
>even the documentation?
As others have already posted, you can set a global flag, field variable,
or custom property to indicate whether the stack was previously opened
during the session. Obviously, if you go for options 2 or 3, you have the
problem of when and how to reset the field or property value: you can't
reset it on closeStack. Since your desire is to monitor stack status
throughout the session, a global will work best because it is "reset"
automatically when the runtime engine quits.
There is another option: lock messages before returning to the stack and
script any needed preOpen/OpenStack functions into the script that returns
to the stack.
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