I can not copy the information that comes in the message enter image description here

Associated with the function, but the columns are not active.

enter image description here

@IBAction func onEnterInTextField(_ sender: NSTextFieldCell) { let selectedRowNumber = messagesTable.selectedRow if selectedRowNumber != -1 { items[selectedRowNumber] = sender.stringValue } } 

    2 answers 2

    The table becomes active when clicked and is also editable if you use the function with the value true.

     func tableView(_ tableView: NSTableView, shouldSelectRow row: Int) -> Bool { return true } 

      Try using the NSTableView delegate method:

       func tableViewSelectionDidChange(_ notification: Notification) { let selectedRowNumber = messagesTable.selectedRow // }