[Newbies] How to empty a collection?
mm3 at zepler.net
Tue Feb 19 01:35:34 UTC 2008
Isn't Cedrick's aida solution going to be significantly faster?
On Feb 19, 2008 1:02 AM, Ron Teitelbaum <Ron at usmedrec.com> wrote:
> Hi Sophie,
> aCollection copy do: [:anElement |
> aCollection remove: anElement
> Why copy? If you start removing items from the collection, increasing the
> index will cause you to skip elements.
> > -----Original Message-----
> > From: itsme213
> > I want to clear its contents (size goes back to zero), and can't seem to
> > find something like #clear or #empty. Cannot use a new collection as
> > are shared references to it.
> > Thanks - Sophie
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners