                     NSApp.presentError(error)
                     
                     let cancelled = (error as? CocoaError)?.code == .userCancelled
-                    NSApp.reply(toOpenOrPrint: cancelled ? .cancel : .failure)
+                    reply = cancelled ? .cancel : .failure
                 }
                 
                 // on first window opened

        let isAutomaticTabbing = (DocumentWindow.userTabbingPreference == .inFullScreen) && (filenames.count > 1)
        let dispatchGroup = DispatchGroup()
        var firstWindowOpened = false
        
        for filename in filenames {
            guard !self.application(sender, openFile: filename) else {

//  ---------------------------------------------------------------------------
//
//  © 2004-2007 nakamuxu
//  © 2013-2021 1024jp
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
