[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: remove list member during a forEach: traversal?
From: |
Nelson Minar |
Subject: |
Re: remove list member during a forEach: traversal? |
Date: |
Tue, 20 Feb 96 16:37:52 MST |
>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.