correction: shutDownRequest HANDLER fails to work

Barry Levine themacguy at macosx.com
Thu Sep 4 12:34:00 EDT 2003


I'm re-posting this because of an inaccuracy in the subject -AND- add'l 
information.

I have an OSX (10.2.6, Rev 2.0.2) stack that, when part of an app, is 
using the following handler in the stack script to intercept the Quit 
command:

on shutDownRequest
   if the platform is "MacOS" then
     answer information "Are you sure you want to quit?" \
     with "Quit" or "Don't Quit"
     if it is "Quit" then pass shutDownRequest
   end if
end shutDownRequest

The first time I select "Quit" from the app menu this handler is called 
and I can cancel the Quit. However, the next time I select "Quit" from 
the app menu (during the same session), the app just quits without the 
intervening dialog. The Rev engine seems to be ignoring the handler 
after the first time it is called.

I have the same app in a Windows build. In that app, the handler shown 
above is commented out and I rely upon the File menu's "Quit" command 
which I have intercepted with a dialog, as well. In that case (WinXP, 
Rev 2.0.2) canceling the Quit confirmation dialog always works properly.

Thanks,
Barry




More information about the use-livecode mailing list