[squeak-dev] OrderedCollection bug?

Steven W Riggins mailinglists at geeksrus.com
Wed Jul 16 05:23:11 UTC 2008


Hi there!

We're running Sophie in a 3.8 image, and ran into a fairly nasty  
OrderedCollection bug.  I've not tried to replicate this in later  
images.

o := OrderedCollection new.
o add: true beforeIndex: 2.

If you do this, the resulting collection is (nil)

No error, and true is not in the collection.

Can someone verify if this still exists, or what the proper behavior is?

Back Story:  When "saving as" our page templates, the code determines  
that some actions are not needed, but it still writes them into the  
new collection based on their old index.  So you end up with a nil  
object in the collection, missing the object you intended to be there,  
and a silent failure to boot.

We'll clean up our usage of OrderedCollection, but shouldn't this at  
least throw an error?

Steve



More information about the Squeak-dev mailing list