         
         menu.removeAllItems()
         
-        self.addChildFileItem(to: menu, in: self.scriptsDirectoryURL)
+        self.addChildFileItem(in: self.scriptsDirectoryURL, to: menu)
         
         if !menu.items.isEmpty {
             menu.addItem(.separator())

    }
    
    
    /// open Script Menu folder in Finder
    @IBAction func openScriptFolder(_ sender: Any?) {
        
        NSWorkspace.shared.activateFileViewerSelecting([self.scriptsDirectoryURL])

    }
    
    
    /// Dispatch an Apple Event that notifies the given document was opened.
    ///
    /// - Parameter document: The document that was opened.
    func dispatchEvent(documentSaved document: Document) {
