• 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
NSSortDescriptor issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSSortDescriptor issue


  • Subject: NSSortDescriptor issue
  • From: Keith Renz <email@hidden>
  • Date: Fri, 28 Nov 2003 15:18:49 -0500

I would prefer to use an array of NSSortDescriptors to sort an array of objects because of the new deep sorting capability using them, but I need to access more information that the sort descriptor allows for. I have a table of sort preference objects, each object having several pieces of information required for sorting an array of objects located in another table. A sort descriptor's compare selector just won't do because I need to know which sort preference object is being used so I can manipulate the comparison. I'm thinking of subclassing NSSortDescriptor and adding my sort preference object to the subclass, but I can't see a way of accessing the sort descriptor during a sort. So, my question is if it's possible to access a sort descriptor while sorting an array using sort descriptors? It would be nice if an NSSortDescriptor had a context parameter like sortUsingFunction:context: allows for and the sort descriptor's compare selector gave access to this context.

Thanks,

Keith
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: NSControllers and App Design
  • Next by Date: [ANN] sample signal-handling code
  • Previous by thread: CFPropertyList and NSDictionary/CFDictionary
  • Next by thread: [ANN] sample signal-handling code
  • Index(es):
    • Date
    • Thread