• 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: Sorting problems with NSArrayController and a value transformer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting problems with NSArrayController and a value transformer


  • Subject: Re: Sorting problems with NSArrayController and a value transformer
  • From: mmalcolm crawford <email@hidden>
  • Date: Tue, 10 May 2005 00:02:59 -0700


On May 9, 2005, at 11:50 PM, Tom Birch wrote:

I managed to solve this with a category for NSArray (implementing - compare:),

This is probably not the Right Thing to do.

but I still don't understand why the value transformer isn't being used to aid sorting

The value transformer transforms the property for display purposes. If you want to sort on a "transformed" attribute, then you should implement a suitable accessor in your Record class to return such that can then be compare:d.

mmalc

_______________________________________________
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


References: 
 >Sorting problems with NSArrayController and a value transformer (From: Tom Birch <email@hidden>)
 >Re: Sorting problems with NSArrayController and a value transformer (From: Tom Birch <email@hidden>)

  • Prev by Date: One window for all documents.
  • Next by Date: Re: One window for all documents.
  • Previous by thread: Re: Sorting problems with NSArrayController and a value transformer
  • Next by thread: One window for all documents.
  • Index(es):
    • Date
    • Thread