Re: NSArrayControllers and sorting
Re: NSArrayControllers and sorting
- Subject: Re: NSArrayControllers and sorting
- From: Jim Hamilton <email@hidden>
- Date: Sat, 6 Aug 2005 10:48:47 -0400
On Aug 6, 2005, at 12:47 AM, Edwin Vane wrote:
Hi,
From the literature I've seen, it looks like array controllers
manage
arrays that have no underlying sorting and that array controllers can
present the array in some sorted manner to the view.
Now, does it make sense to have a subclass of an array controller (I
would guess) to keep the array it's bound to in some permanent sorted
order (such as if the array is sorted by floating point time values)?
Inserting something into the middle of an array, causing all later
elements to be shifted, would trigger a whole bunch of change
notifications would it not?
You don't need a subclass. Look at NSSortDescriptors.
<http://developer.apple.com/documentation/Cocoa/Conceptual/
SortDescriptors/index.html>
--
Jim Hamilton
email@hidden
email@hidden
_______________________________________________
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