unexpected quit on closeStackRequest

Kurt Kaufman kkaufman at snet.net
Thu Jul 11 20:46:01 EDT 2002


KURT:
 >The following causes a (repeatable) unexpected quit (according to
 >Mac OS X) only when run from within a stack, not as a standalone:
 >
 >on closeStackRequest
 >   answer "This will close this application." with "Cancel" or "Close"
 >   if it is "Cancel" then exit to top
 >   else
 >     if there is a file "tempfile.txt" then
 >       delete file "tempfile.txt"
 >     end if
 >      pass closeStackRequest
 >   end if
 >end closeStackRequest

ROB:
FWIW, your handler runs fine on Mac OS 9.  One thought:
closeStackRequest should be speciific to the stack whose close box is
clicked on: I see no reason to pass it.

KURT:
Thanks for testing the script, Rob.  However, if I comment out the line:
pass closeStackRequest

in the above script, the stack does not close after deleting the temp 
file.
Perhaps the Rev editor has to do some stuff which it doesn't get done if 
the closeStackRequest is not passed? Curious.




More information about the use-livecode mailing list