Re: A custom way to sort EOs by key ?
Re: A custom way to sort EOs by key ?
- Subject: Re: A custom way to sort EOs by key ?
- From: Andrew Lindesay <email@hidden>
- Date: Fri, 11 May 2007 13:40:16 +1200
Hello Robert;
I would generally follow the lead of these guys and add an "ordering
attribute" or derived method. However if for some reason you need to
sort on something more primitive, I have previously subclassed
NSComparator and made my own sorting method. See the javadoc for
more detail on this, but you can then use...
NSArray.sortedArrayUsingComparator(myComparator)
cheers.
You could also add an "ordering" column to the EO. Then you sort on
the "ordering" column.
...
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.
...
EOSortOrdering .sortOrderingWithKey(String key, NSSelector selector)
...
Does anyone have an idea of how this could be done???
___
Andrew Lindesay
technology : www.lindesay.co.nz
business : www.silvereye.co.nz
_______________________________________________
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