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: Thu, 10 Oct 2002 09:44:11 -0400
on 02-10-10 8:13 AM, mw at email@hidden wrote:
>
> while(index = [e nextObject]) {
>
> [employees insertObject:[unarchivedPeople objectAtIndex:i]
>
> atIndex:(unsigned)row];
>
> i++;
>
> row++;
>
> }
This is an object enumerator loop, right? The documents do warn you against
altering the array (i.e., inserting and deleting objects) while looping with
an enumerator, as I recall. I once assumed that this was strictly because of
the indexing issues and that I could avoid problems by being careful with
the index. But others set me straight. You really can't reliably add and
remove objects from an array in an enumerator loop. As I recall.
--
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.