[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] Bug in CollStream-reset or ArrayedCollection-extend?

On Nov 21, 2004, at 3:18 PM, Scott Wilson wrote:

On 21 Nov 2004, at 21:00, James McCartney wrote:

*on is for writing on a collection.
If you want to read a collection, use the setter for collection.

That's what I did in my Buffer method.

Perhaps *new could be rewritten as;

	*new { arg collection;
		^super.new.collection_(collection ?? { String.new(128) })

That shouldn't break anything and could be useful. Shall I do this?

Well now I am wondering if the same class should be used for reading and writing, or how to indicate that *on should not wipe out the collection if you are going to be reading.