When saving a newly created file in a directory (such as "Applications/Alpha") where the user apparently does not have write permissions, the save attempt fails with a permissions error "Error processing menu item".
After successfully saving the file in an alternate location, there is still only one window open but the filename in the window header has a <2> after it. Attempting to close this window gives the error dialog “can’t find the old window in creation list! Bad error in win::destroyed for (my filename)". It does not prevent me from subsequently closing the window, so this may be just an error in a trap routine.
Changed the summary to describe the issue.
The reported problem happens with any saveAs operation.
The culprit was the -[AlphaDocument setFileURL:] method. The copyNum was calculated too late when the displayName had already been modified by Cocoa.
This is fixed now.