diff --git a/ChangeLog b/ChangeLog index 46301103e..ce9df91e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-07-25 22:28 Gregory John Casamento + + * Source/NSOutlineView.m: Make [NSOutlineView rowForItem:] return + -1 as per specs, instead of NSNotFound. + 2005-07-22 Adam Fedor * Version 0.10.0 diff --git a/Source/NSOutlineView.m b/Source/NSOutlineView.m index 9f2532d9e..5e6a63af6 100644 --- a/Source/NSOutlineView.m +++ b/Source/NSOutlineView.m @@ -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; } /**