Re: strange enum error
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