diff --git a/ChangeLog b/ChangeLog index 6c4586a21..0f86ce71d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-03-17 Fred Kiefer + + * Source/NSOutlineView.m (-namesOfPromisedFilesDroppedAtDestination:), + * Source/NSTableView.m + (-namesOfPromisedFilesDroppedAtDestination:): Implement this drag + and drop support method. + 2011-03-16 Fred Kiefer * Source/NSComboBoxCell.m: Correct imports. diff --git a/Source/NSOutlineView.m b/Source/NSOutlineView.m index b197dc4ba..87756b1aa 100644 --- a/Source/NSOutlineView.m +++ b/Source/NSOutlineView.m @@ -1445,6 +1445,21 @@ Also returns the child index relative to this parent. */ return YES; } +- (NSArray*) namesOfPromisedFilesDroppedAtDestination: (NSURL *)dropDestination +{ + if ([_dataSource respondsToSelector: + @selector(outlineView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:)]) + { + return [_dataSource outlineView: self + namesOfPromisedFilesDroppedAtDestination: dropDestination + forDraggedRowsWithIndexes: _selectedRows]; + } + else + { + return nil; + } +} + // Autosave methods... - (void) setAutosaveName: (NSString *)name { diff --git a/Source/NSTableView.m b/Source/NSTableView.m index 1adf36a61..607887e2b 100644 --- a/Source/NSTableView.m +++ b/Source/NSTableView.m @@ -5348,6 +5348,21 @@ This method is deprecated, use -columnIndexesInRect:. */ return _verticalMotionDrag; } +- (NSArray*) namesOfPromisedFilesDroppedAtDestination: (NSURL *)dropDestination +{ + if ([_dataSource respondsToSelector: + @selector(tableView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:)]) + { + return [_dataSource tableView: self + namesOfPromisedFilesDroppedAtDestination: dropDestination + forDraggedRowsWithIndexes: _selectedRows]; + } + else + { + return nil; + } +} + /* * Encoding/Decoding */