Stack designers can define a closePalette, closePicture, or closeMovie
handler to take care of any cleaning up or updating when a window is
closed.
One restriction: Don't try to close the window again within a
closePalette, closePicture, or closeMovie handler. The script can STILL
refer to the window, for example, getting (or even setting) the window's
location. The script can also close other windows -- but HyperCard will
crash if the script tries to close the window (e.g., close window id (the
param of 2)).
This article is adapted from the Claris Tech Info database.