Re: NSTableView Drag & Drop... Well, Maybe
Re: NSTableView Drag & Drop... Well, Maybe
- Subject: Re: NSTableView Drag & Drop... Well, Maybe
- From: Bill Cheeseman <email@hidden>
- Date: Wed, 09 Oct 2002 20:43:32 -0400
on 02-10-09 7:06 PM, mw at email@hidden wrote:
>
but now I keep getting
>
out-of-range errors when inserting objects into the main employees array.
>
For example, this code:
>
>
while(index = [e nextObject]) {
>
[employees insertObject:[unarchivedPeople objectAtIndex:i]
>
atIndex:(unsigned)row];
>
i++;
>
row++;
>
}
>
>
Seems to SOMETIMES have a problem with the first line in the while loop
It's too late at night for me to focus on this (my best work is done when I
get up at 4:00 AM, unlike most programmers who go to bed then). But it seems
to me that you can't insert an object and increment the loop counter in the
same iteration without messing up the indices. In the next iteration, the
index is referring to the object you just inserted.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
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.