• 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: A custom way to sort EOs by key ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Re: NSTimer replacement?
  • Next by Date: Re: MSIE is not the postman
  • Previous by thread: Re: A custom way to sort EOs by key ?
  • Next by thread: action not being called inside conditional/repetition
  • Index(es):
    • Date
    • Thread