Hello!
This one is giving me a headache:
In my app I use the following simple type construct to get a sorted list of elements.
Each entry has an id (=the static array index) and a percentage value.
The result looks like this:

What I would like to have is that the entries of the same percentage (e.g. 100% on the screen) get sorted "inside" as well. Means all entries of the same percentage get sorted after their id number/field.
So I have:
001 name (100 %)
006 name (100 %)
031 name (100 %)
(...)
033 name (99 %)
040 name (99 %)
041 name (99 %)
(...)
and so on.
How can I sort my type list to get such results without "destroying" their proper "overal" order?
Thanks, Grisu
P.S.:
The faster the sorting algo the better as I have to do this realtime! :(
This one is giving me a headache:
In my app I use the following simple type construct to get a sorted list of elements.
Type sortdfa_type Field id: Int Field z:Int Field av_c:Int Method compare:Int(v:Object) Return sortdfa_type(v).z-z EndMethod EndType ' Sorting... SortArray.sort(False) SortArray.sort(True)
Each entry has an id (=the static array index) and a percentage value.
The result looks like this:

What I would like to have is that the entries of the same percentage (e.g. 100% on the screen) get sorted "inside" as well. Means all entries of the same percentage get sorted after their id number/field.
So I have:
001 name (100 %)
006 name (100 %)
031 name (100 %)
(...)
033 name (99 %)
040 name (99 %)
041 name (99 %)
(...)
and so on.
How can I sort my type list to get such results without "destroying" their proper "overal" order?
Thanks, Grisu
P.S.:
The faster the sorting algo the better as I have to do this realtime! :(