HyperCard: Preventing Users from Interrupting Scripts (7/92)

As a stack developer, how can I stop a user from pressing Command-Period
(interrupting an action) during one of my scripts?

You can't. But if your script involves hiding and showing buttons and
fields, here's a way you can make sure the stack is returned to normal in
the event a user presses Command-Period during the process: at the start of
the script, "set the cantModify of this stack to true". Also, in your
idle handler, add the line "the cantModify of this stack to false". That
way, if the user cancels during the hiding and showing, the stack will
revert to the way it was before the user initiated the action.


This article is adapted from the Claris Tech Info database.
Published Date: Feb 19, 2012