[squeak-dev] OrderedCollection bug?

Steven W Riggins mailinglists at geeksrus.com
Wed Jul 16 07:53:31 UTC 2008


Indeed.  I suspect this is likely the issue.  It was initially done  
when something is cut out of a list, the undo can put it back.  Likely  
it should recall which object it was after, stick it back in and resort.

The bug we ran into was when adding an action, the action list was  
empty, but a method synthesized a list composed of the frame and  
template frame, which was not empty, so then it decided to insert  
before index 3.  That code has been changed to just do an add:

Steve

On Jul 15, 2008, at 11:24 PM, tim Rowledge wrote:

> Just as #add:before: raises an exception when the second arg is not  
> in the collection (indirectly, since #find: does not find the second  
> arg) add:beforeIndex: should raise an exception if there is no valid  
> index given as the second arg. Though to be honest I really don't  
> think OrderedCollection should even implement add:beforeIndex: &  
> add:afterIndex:. It's just.... yuck. All the usages I can spot are  
> simply poor algorithms that ought to be done properly.
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Oxymorons: Act naturally
>
>
>




More information about the Squeak-dev mailing list