swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: remove list member during a forEach: traversal?


From: Rick Riolo
Subject: Re: remove list member during a forEach: traversal?
Date: Tue, 20 Feb 1996 19:21:23 -0500 (EST)

I saw the announcement of the removeAll and dropAll
in the new release...thanks for providing these.

For my purposes, I want to (sometimes)
drop the one object, so I will continue doing what
I was doing (ie run my own index and conditional drop).
I was just hoping I could streamline the program
using the forEach if it supported the remove.
Not a big deal without it.
thanks for the info.
 - r

Rick Riolo                       address@hidden
Program for Study of Complex Systems (PSCS)
1061 Randall Lab     University of Michigan
Ann Arbor MI 48109-1120
http://pscs.physics.lsa.umich.edu/rlr-home.html

On Tue, 20 Feb 1996, Nelson Minar wrote:

> Date: Tue, 20 Feb 96 16:37:52 MST
> From: Nelson Minar <address@hidden>
> To: "Roger M. Burkhart" <address@hidden>
> Cc: address@hidden, address@hidden
> Subject: Re: remove list member during a forEach: traversal?
> 
> >The best workaround for now is to run your own loop (forEach doesn't
> >do anything more than automate the loop) with your own index and have
> >your myMsg remove the member using the index:
> >  [currentIndex remove];
> 
> or if you just want to remove everything, call.
>   [aCollection removeAll]
> There's also
>   [aCollection dropAll]
> which also sends drop messages to all the objects. Beware of doing
> this if there are duplicates in the collection.
> 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]