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: Mon, 11 Feb 2002 16:41:14 -0600
On 2/11/02 8:01 AM, "Smith, Bradley" <email@hidden> wrote:
>
> SB> [employees removeObjectAtIndex:[anIndex intValue] -
>
> indexOffset++];
>
> SB>
>
> SB> This keeps everything in synch nicely.
>
>
>
> It does work, yep, but why are you that sure the selection
>
> will be *always*
>
> given ordered ascendingly? Unless I missed something in docs,
>
> this is not
>
> granted.
When selecting a range of entries, the selectedRow is always the last row
actually selected. So if you select rows 3-4-5 the selected row is 5. If you
select 5-4-3 the selected row is 3. You can test where you are by asking if
the selected row + 1 is selected. If it is not you've got the top of the
range and the quoted source works. If it is selected, you're at the bottom
of the range and you don't need the offset.
_______________________________________________
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.