Re: newbie question on 'Cocoa Programming for Mac OS X'
Re: newbie question on 'Cocoa Programming for Mac OS X'
- Subject: Re: newbie question on 'Cocoa Programming for Mac OS X'
- From: Tony Cate <email@hidden>
- Date: Thu, 07 Feb 2002 22:25:22 -0600
On 2/7/02 6:55 PM, "Jon B. Williams" <email@hidden> wrote:
>
I solved the problem by reversing the order of the items in the
>
enumerator, so that you have a list of indices running from largest to
>
smallest, instead of smallest to largest
Another approach:
row = [tableView selectedRow];
if (row > -1) // Ensure a row is selected.
{
if (![tableView isRowSelected:(row + 1)])
// we're at the top of the selection
row -= ([tableView numberOfSelectedRows] - 1);
// select the bottom row.
while ((object = [enumerator nextObject]))
{
[employees removeObjectAtIndex: row];
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.