
/*
	Return an array of the selected rows
	Original Source: <http://cocoa.karelia.com/AppKit_Categories/NSTableView/Return_an_array_of_.m>
	(See copyright notice at <http://cocoa.karelia.com>)
*/

/*"	This provides an NSArray of the selected rows, similar to #selectedRowEnumerator.
"*/

- (NSArray *) selectedRows
{
	NSEnumerator *theEnum = [self selectedRowEnumerator];
	NSNumber *rowNumber;
	NSMutableArray *rowNumberArray
		= [NSMutableArray arrayWithCapacity:[self numberOfSelectedRows]];

	while (nil != (rowNumber = [theEnum nextObject]) )
	{
		[rowNumberArray addObject:rowNumber];
	}
	return rowNumberArray;
}