• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sort in memory over multiple fields
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sort in memory over multiple fields


  • Subject: Re: Sort in memory over multiple fields
  • From: "John Huss" <email@hidden>
  • Date: Thu, 9 Feb 2006 12:43:03 -0600

Thanks!
----- Original Message -----
From: Jerry W. Walker
To: John Huss
Cc: WebObjects Dev Apple
Sent: Thursday, February 09, 2006 12:32 PM
Subject: Re: Sort in memory over multiple fields

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


--
__ 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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Sort in memory over multiple fields (From: "John Huss" <email@hidden>)
 >Re: Sort in memory over multiple fields (From: "Jerry W. Walker" <email@hidden>)

  • Prev by Date: Re: horizontal mapping inheritance fetch trouble
  • Next by Date: deprecated API
  • Previous by thread: Re: Sort in memory over multiple fields
  • Next by thread: deprecated API
  • Index(es):
    • Date
    • Thread