How about a TList of THeader and then sort that. Some pointers below

 

http://groups.google.co.nz/groups?hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8&safe=off&threadm=p45b2t091fnq34hdp7ap7qb4jtjn640e9m%404ax.com&rnum=2&prev=/groups%3Fq%3Dsorting%2BTList%2Brecord%2Bof%26hl%3Den%26lr%3Dlang_en%26ie%3DUTF-8%26oe%3DUTF-8%26safe%3Doff%26selm%3Dp45b2t091fnq34hdp7ap7qb4jtjn640e9m%25404ax.com%26rnum%3D2

 

http://groups.google.co.nz/groups?q=sorting+TList+record+of&hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8&safe=off&selm=Okle3.97%24Gx.330%40news1.online.no&rnum=3

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Coley
Sent: Thursday, 4 December 2003 9:40 a.m.
To: [EMAIL PROTECTED]
Subject: [DUG] Sorting dynamic array of record types

 

Hello,

 

I have a record type array similar to below:

 

Type

            THeader = record

                        Description: string[100];

                        Temp: string[100];

                        Sort: Integer;

                        Type: byte;

            End;

 

            THeaderArray = array of TTemplateHeader;

 

 

I sort using the Sort field, but on some collections the Sort will be zero, so then I’d like to sort on the Description (alphanumerically).

 

Question: How can I sort this, or what would be the best method to do this?

 

Jason

_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to