On May 10, 2007, at 11:19 PM, Matthew W. Taylor wrote:
It sounds like what you want to do is perform "Natural" sort ordering to the results. sortedArray = unsortedArray.sortedArrayUsingComparator(new EOCustomObjectNaturalOrderComparator("nameOfKeyToSortBy"));
                

//  EOCustomObjectNaturalOrderComparator.java

That's absolutely what I was looking for :-)
I had just missed the NSArray.sortedArrayUsingComparator method :(
And it's far more obvious how to subclass a NSComparator than a NSSelector ;-)

The only drawback compared to EOSortOrdering.sortedArrayUsingKeyOrderArray is that I cannot do ordering for several keys : ORDER BY name, otherKey ...

Ken : I wanted to do the ordering in memory and since the name is user input, it would not be very easy to separate the number in a different column

David : the ordering column would have been a great idea (I keep it in mind for later use) if I had a user-given order ie List as Robert said. I would still be curious to know if a list mechanism is implemented in ProjectWonder.


Thanks to all of you who answered me :-)
You don't imagine how valuable the list's help is to me.


I hope to meet some of you at WWDC

Regards

Fabrice




www.easyshadow.com

International Corporate Consulting
Palais de la Scala
1 avenue Henri Dunant
Suite 1155
MC - 98000 Monaco

Skype: fabrice.pipart
Tel.  +377 97 98 21 04 (direct)
Fax. +377 97 70 88 07


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
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