약속 된 파일을 DnD하려고합니다. 방법에있어서 :Cocoa : namesOfPromisedFilesDroppedAtDestination은 하나의 파일 만 반환합니다.
- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(NSInteger)index
내 pboard 유형 NSFilesPromisePboardType
입니다 볼 때, 내가 할 :
NSArray *filenames = [info namesOfPromisedFilesDroppedAtDestination:[NSURL fileURLWithPath:path]]
(info
물론 NSDraggingInfo
입니다).
Mac 용 Outlook과 같은 응용 프로그램에서 여러 파일을 드래그하면 namesOfPromisedFilesDroppedAtDestination
은 예상대로 작동하고 "파일 이름"배열은 가능한 한 많은 항목을 보유합니다.
그러나 Chrome에서 항목 (예 : Gmail 첨부 파일)을 드래그하면 pboard.pasteboardItems
은 모든 첨부 파일을 보관하지만 namesOfPromisedFilesDroppedAtDestination
은 하나의 항목 만 반환합니다.
이 문제를 해결하는 방법에 대한 아이디어가 있으십니까?
감사합니다 만,
Nili
그래서 할 수 있는게 없나요? – Nili
소스를 수정할 수 없기 때문에, 아니요. –