Validation Nstableview:拖放时验证发送方和接收方

Validation Nstableview:拖放时验证发送方和接收方,validation,drag-and-drop,nstableview,Validation,Drag And Drop,Nstableview,我正在两个nstableview之间实现拖放。到目前为止,我已经设法让拖放操作正常工作。然而,我的特殊需要是能够验证谁发起了拖动,谁接受了拖放。我的应用程序中不止有两个NStableView,因此我需要确保正确的表正在通信 事实证明,在validateDrop和acceptDrop方法中 - (NSDragOperation) tableView: (NSTableView *)view validateDrop:(id)info proposedRow:(NSInteger)row propo

我正在两个
nstableview
之间实现拖放。到目前为止,我已经设法让拖放操作正常工作。然而,我的特殊需要是能够验证谁发起了拖动,谁接受了拖放。我的应用程序中不止有两个NStableView,因此我需要确保正确的表正在通信

事实证明,在validateDrop和acceptDrop方法中

- (NSDragOperation) tableView: (NSTableView *)view validateDrop:(id)info proposedRow:(NSInteger)row proposedDropOperation:(NSTableViewDropOperation)op

- (BOOL)tableView: (NSTableView *)view acceptDrop: (id)info row: (NSInteger)row dropOperation: (NSTableViewDropOperation)op
在这两种情况下,“视图”都是acceptor表。也就是说,它是接收下降的表。有没有办法知道是哪个表启动了拖动


谢谢你的帮助,谢谢

这比看起来要简单得多,我希望我找到的答案能帮助其他人

在方法中

(BOOL)tableView: (NSTableView *)view acceptDrop: (id)info row: (NSInteger)row dropOperation: (NSTableViewDropOperation)op
(id)info
包含有关拖动源的所有信息。大概是

         NSTableView *dragSource = [info draggingSource]; 
我会给你牵引源