|
Re: Re: Recap: How to empty a collection: msg#00140lang.smalltalk.squeak.beginners
This is the last change, I promise :) Previous solution was for collections in general, while for OrderedCollection you can simply do: self setCollection: Array new. A bit optimized method will therefore be: removeAll "remove all elements quickly" self setCollection: (Array new: 10). "Squeak specific" self become: OrderedCollection new " "VW specific" Janko Janko Mivšek wrote: Ok, I reimplemented this method as Bert suggested and in the next version of Aida/Web it will be: -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Re: Recap: How to empty a collection, Janko Mivšek |
|---|---|
| Next by Date: | Re: More Morphic Fun, Edgar J. De Cleene |
| Previous by Thread: | Re: Re: Recap: How to empty a collection, Janko Mivšek |
| Next by Thread: | Re: [Squeak 0006937]: removeAll: aCollection doesn't do what we expect if aCollection==self, Klaus D. Witzel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |