Problem: 1634577

Title: "Quit with saving" does not save.

Received: Feb 28 1997 5:01PM


Using Quit with saving does not work. You get a dialog asking you to save.

To reproduce:

0) Launch the application and open an existing matrix document.
1) Run this AppleScript script:
tell application "Foo"
     tell document 1
          create new user at the end
          delete user (count user)
     end tell 
     quit with saving 
end tell
Foo opens a "do you want to save" dialog - it should have saved and quit.

Workaround:

tell application "Foo"
     tell document 1
          create new user at the end
          delete user (count user)
          save
     end tell 
     quit  
end tell

There is no 'saving' option in MacApp's 'quit' event. Application should support it itself.
The AppleScript Language Guide, pp 109-10, clearly specifies that the saving option of the quit command is part of the Core event suite. It is optional from the point of view of the AppleScript, not the application being scripted. To support the Core suite, the application should, if appropriate, honor the directives of the optional argument.

Supporting the 'saving' option at the application level requires a complete re-implementation of the 'quit' event handling. The correct location for support of this event would be in MacApp.