• 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
sorting problems with custom compare
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sorting problems with custom compare


  • Subject: sorting problems with custom compare
  • From: email@hidden
  • Date: Tue, 08 Aug 2006 18:19:59 +0000

Hi all,

I have a table which I want to sort.  I added a custom compare method as a category to NSValue to sort NSPoint.  I also defined a sort descriptor so that this method is used.  Everything works fine up to this point.

The problem is that I want to sort based on the position of the scroller i.e. if the scroller moves I call the sort routine (I am drawing an alignment and if the text in the particular row is not in the visible area, I want it sent to the bottom of the table).  Is there any way I can pass the position of the scroller to my custom compare method?   The only parameter in the custom compare method is the NSPoint which is being compared and I do not call this method directly.  Any suggestions on how I may be able to do this?

Sorry if what I want to do is not clear but the basic idea is that I need to pass a parameter to a custom compare method.  Is there any way of doing this?

Thanks in Advance

Sarven
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Temporal XCode 2.4 problem in ADC
  • Next by Date: Re: Temporal XCode 2.4 problem in ADC
  • Previous by thread: displaying an NSImage in customer NSView
  • Next by thread: NSXMLDocument and fetching attributes with name spaces?
  • Index(es):
    • Date
    • Thread