• 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: NSComparator not adequate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSComparator not adequate?


  • Subject: Re: NSComparator not adequate?
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 29 Sep 2003 22:33:48 -0700

Use two NSComparator sub-classes, one for time and one for way points.


Chuck


At 10:28 PM 29/09/2003 -0700, Robert A. Decker wrote:
>I'm converting an app from 4.5.1 to 5.2.1. I used NSSelector to sort
>arrays on a number of variables. I can't quite figure out how to do this
>with the new NSComparator system.
>
>For example, if I have a class WayPoint that describes a geographic
>location at a specific instance in time, I may want to sort a group of
>waypoints based on time, or I may want to sort a group of WayPoints based
>on their coordinates.
>
>With NSSelector I'd write two methods (compareUsingTime and
>compareUsingCoordinates) and sort arrays using an NSSelector (NSSelector
>sel = new NSSelector("compareUsingTime");).
>
>However, with this NSComparator system I can only use one method -
>compare. Also, I don't think EOSortOrdering will work for me because these
>objects (WayPoint) aren't actually enterprise objects.
>
>Any suggestions?
>
>thanks,
>Robert A. Decker
>
>http://www.robdecker.com/
>
>_______________________________________________
>WebObjects-dev mailing list
>email@hidden
>http://www.omnigroup.com/mailman/listinfo/webobjects-dev
>

--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSComparator not adequate? (From: "Robert A. Decker" <email@hidden>)

  • Prev by Date: NSComparator not adequate?
  • Next by Date: joCache?
  • Previous by thread: NSComparator not adequate?
  • Next by thread: joCache?
  • Index(es):
    • Date
    • Thread