Correct declaration of data source methods and the implementation

in NSOutlineView.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32746 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2011-03-30 08:17:00 +00:00
parent eabc41114a
commit 02f8b9c21a
4 changed files with 43 additions and 7 deletions

View file

@ -1448,11 +1448,21 @@ Also returns the child index relative to this parent. */
- (NSArray*) namesOfPromisedFilesDroppedAtDestination: (NSURL *)dropDestination
{
if ([_dataSource respondsToSelector:
@selector(outlineView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:)])
@selector(outlineView:namesOfPromisedFilesDroppedAtDestination:forDraggedItems:)])
{
int count = [_selectedRows count];
NSMutableArray *itemArray = [NSMutableArray arrayWithCapacity: count];
unsigned int index = [_selectedRows firstIndex];
while (index != NSNotFound)
{
[itemArray addObject: [self itemAtRow: index]];
index = [_selectedRows indexGreaterThanIndex: index];
}
return [_dataSource outlineView: self
namesOfPromisedFilesDroppedAtDestination: dropDestination
forDraggedRowsWithIndexes: _selectedRows];
forDraggedItems: itemArray];
}
else
{