• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTableView Drag & Drop... Well, Maybe
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: NSTableView Drag & Drop... Well, Maybe (From: "mw" <email@hidden>)

  • Prev by Date: Re: Carbon vs Cocoa arguments
  • Next by Date: NSSlider preventing events firing
  • Previous by thread: Re: NSTableView Drag & Drop... Well, Maybe
  • Next by thread: Where is "CoreMenuExtraGetMenuExtra" in 10.2?
  • Index(es):
    • Date
    • Thread