I misunderstood you, I did know the order changes when the index is
added, but I thought you said it changes after the index is added. We
ran into that problem in 0.6 when the order of items in the summary view
randomly changed when an index was added. I agree it would be nice if
the order of a numeric index matched the order of the ref collection.
John
Morgen Sagen wrote:
Morgen Sagen wrote:
A small detail we need to fix: ListCollection doesn't maintain its
intrinsic sort order after an index has been added.
On Feb 9, 2006, at 6:33 AM, John Anderson wrote:
I haven't seen this. The summary view's use numeric indexes and they
maintain intrinsic order. What situations are you seeing this not work?
Create a ListCollection (with no index) and add items to it. Iterate
that collection and you will happen to get the items back in the order
in which they were added. Add an index to the collection. Iterate
the collection again and you will get back the items not in the
original as-added order, but in the order they appear in the index.
Andi explained exactly why this happens -- since ListCollection is
based on a Set it really has no intrinsic order, and you can't count
on getting items back in the as-added order. I think it would be nice
if ListCollections did maintain their order.
~morgen
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev