logo       

Re: Re: Recap: How to empty a collection: msg#00125

lang.smalltalk.squeak.beginners

Subject: Re: Re: Recap: How to empty a collection

On Tue, 19 Feb 2008 15:19:40 -0800, nicolas cellier <ncellier@xxxxxxxxxxx> wrote:

But become: is still essential for operations like growing the MethodDictionary when you add new methods to a class, or migrate allInstances when you a or remove an instance variable to a class, to name few.
So, it is not bogus. Just handle with care.

OK. Does a newbie need to use it? To empty a collection? (Or whatever?)

I'm trying to get at what should be a very simple thing without going to the metal, as it were.

One thing I wasn't clear on is whether Bert's suggestion:

aColl removeAllSuchThat: [:anElement| true].

Is okay, and why it's okay while many of the other similar approaches were not.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise