removing all elements from a collection -djb
brans at nerdonawire.com
Sun Apr 20 18:08:32 UTC 2003
I can't seem to find a method for removing all elements from a collection. I wonder why that is?
Perhaps it's because you're just expected to throw the whole collection out and use Collection new.
But suppose you wanted to keep the collection and just remove each element one by one. What is the best way to implement that?
self removeAll: self. "This doesn't work"
self removeAll: self copy "Seems to work..."
Nerd on a Wire
Web design that's anything but square
mailto: brans at nerdonawire.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev