<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I can't seem to find a method for removing all
elements from a collection. I wonder why that is?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Perhaps it's because you're just expected to throw
the whole collection out and use Collection new.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>But suppose you wanted to keep the collection and
just remove each element one by one. What is the best way to implement
that?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Collection>>removeAllElements</FONT></DIV>
<DIV><FONT face=Arial size=2>self removeAll: self. "This doesn't
work"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Collection>>removeAllElements</FONT></DIV>
<DIV><FONT face=Arial size=2>self removeAll: self copy "Seems to
work..."</FONT></DIV>
<DIV> </DIV></FONT><FONT face=Arial size=2></FONT></DIV>
<DIV><FONT face=Arial size=2>Derek Brans<BR>Nerd on a Wire<BR>Web design that's
anything but square<BR><A
href="http://www.nerdonawire.com">http://www.nerdonawire.com</A> <BR>phone:
604.874.6463<BR>mailto: <A
href="mailto:brans@nerdonawire.com">brans@nerdonawire.com</A><BR></FONT></DIV></BODY></HTML>