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.  

Ron

> -----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 there
> are shared references to it.
> 
> Thanks - Sophie


_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to