• 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: strange enum error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange enum error


  • Subject: Re: strange enum error
  • From: Art Isbell <email@hidden>
  • Date: Tue, 22 Feb 2005 11:49:46 -1000

On Feb 22, 2005, at 11:36 AM, Stephen Todd wrote:

We have a method that removes all objects from a many-to-many relationship then adds in new values. It uses the code that follows the message. When we try and empty the array it only ends up removing half the items.

	Enumeration aclEnum = user.ACLs().objectEnumerator();
	while(aclEnum.hasMoreElements())
	{
		ACL acl = (ACL)aclEnum.nextElement();

		user.removeObjectFromBothSidesOfRelationshipWithKey(acl, "ACLs");
	}

From NSArray's objectEnumerator() method description:

" When this method is used with mutable subclasses of NSArray, your code shouldn't modify the array during enumeration."

Aloha,
Art

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >strange enum error (From: Stephen Todd <email@hidden>)

  • Prev by Date: strange enum error
  • Next by Date: Re: strange enum error
  • Previous by thread: strange enum error
  • Next by thread: Re: strange enum error
  • Index(es):
    • Date
    • Thread