Hi, John,

EOSortOrdering field1 = new EOSortOrdering("someKey1", EOSortOrdering.CompareAscending );
EOSortOrdering field2 = new EOSortOrdering("someKey2", EOSortOrdering.CompareDescending );
EOSortOrdering field3 = new EOSortOrdering("someKey3", EOSortOrdering.CompareCaseInsensitiveAscending );
NSArray sortOrderings = new NSArray(new Object[] { someKey1, someKey2, someKey3 } );

NSArray sortedDataset = EOSortOrdering.sortedArrayUsingKeyOrderArray(dataset, sortOrderings);

Will sort the contents of the dataset NSArray of EOs in the order of someKey1 highest to someKey3 lowest priority sort fields in the directions specified.

See the EOSortOrdering API.

Regards,
Jerry

On Feb 9, 2006, at 1:09 PM, John Huss wrote:

What's the best way to sort a dataset in memory using multiple fields?
 
I have access to Project Wonder to do it.
 
Thanks,
John
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:

This email sent to [EMAIL PROTECTED]


--
__ Jerry W. Walker,
   WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems

    jerrywwalker@gee-em-aye-eye-ell.com
    203 278-4085        office



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to