ValidateDrop method is not working.
func tableView(_ tableView: NSTableView, writeRowsWith rowIndexes: IndexSet, to pboard: NSPasteboard) -> Bool {
let data = NSKeyedArchiver.archivedData(withRootObject: rowIndexes)
pboard.declareTypes([NSPasteboard.PasteboardType(rawValue: "public.data")], owner: self)
pboard.setData(data, forType: NSPasteboard.PasteboardType(rawValue: "public.data"))
print("WriteRows")
return true
}
func tableView(_ tableView: NSTableView, validateDrop info: NSDraggingInfo, proposedRow row: Int, proposedDropOperation dropOperation: NSTableView.DropOperation) -> NSDragOperation {
if dropOperation == .above {
return .move
}
print("acceptDrop")
return []
}
"WriteRows" is printed but validatedRow doesn't work and doesn't print.
At the first attempt of dragging this message is printed.
2018-03-02 12:55:05.785644+0100 Plantilla[37119:1093734] MessageTracer: load_domain_whitelist_search_tree:73: Search tree file's format version number (0) is not supported
2018-03-02 12:55:05.785702+0100 Plantilla[37119:1093734] MessageTracer: Falling back to default whitelist