Corrected problem with NSOutlineView.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21539 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2005-07-26 02:22:28 +00:00
parent a4f08e6915
commit ff1506b59c
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2005-07-25 22:28 Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSOutlineView.m: Make [NSOutlineView rowForItem:] return
-1 as per specs, instead of NSNotFound.
2005-07-22 Adam Fedor <fedor@gnu.org>
* Version 0.10.0

View file

@ -516,11 +516,13 @@ static NSImage *unexpandable = nil;
}
/**
* Returns the corresponding row in the outline view for the given item.
* Returns the corresponding row in the outline view for the given item. Returns
* -1 if item is nil or not found.
*/
- (int)rowForItem: (id)item
{
return [_items indexOfObject: item];
int row = [_items indexOfObject: item];
return (row == NSNotFound) ? -1 : row;
}
/**