You could also add an "ordering" column to the EO. Then you sort on
the "ordering" column.
David
On 10 May 2007, at 8:27 AM, Ken Anderson wrote:
Fabrice,
I would suggest, if possible, to separate the number from the name
in the EO. That way, you could just sort on the number, or a
combination of name and number.
Even with your own sorting, you're going to have to pull the number
off the end of the string to sort it properly.
Do you want to do this with a database query, or in memory? If in
memory, you could create a method that pulls the number off and
returns that number, then use that method as the key for sorting in
memory.
Ken
On May 10, 2007, at 11:21 AM, Fabrice Pipart wrote:
Hi Dear List !
I have been looking for way to sort my EOs in a custom way for
hours and did not find any solution.
I wondered if someone had a solution for this.
I only want to do that sorting in memory with
EOSortOrdering .sortOrderingWithKey(String key, NSSelector selector)
Let's say I have a Screen EO
Screen has a name
Let's say I have EOs with names "Screen1", "Screen2", "Screen11",
"Screen22", "Screen3"
WebObjects using EOSortOrdering.CompareAscending allows me to an
array of those EOs sorted like this :
Screen1
Screen11
Screen2
Screen22
Screen3
Wouldn't it be great to be able to sort them like this?
Screen1
Screen2
Screen3
Screen11
Screen22
So I tried to understand how to subclass something, create a
corresponding NSSelector like are EOSortOrdering.CompareAscending
and such... no luck :-(
Does anyone have an idea of how this could be done???
Regards
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
_______________________________________________
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/kenlists%
40anderhome.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
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/programmingosx
%40mac.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
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]