Skip navigation.
 
mlRe: Multi-Array Sorting Problem
FROM : Jon Hull
DATE : Tue Aug 15 20:11:43 2006

When I had to do something like this, I kept Array B in a 
NSDictionary (using the items from Array A as keys).

I have also (for a different case) made an object which holds one set 
of items (line x from Arrays A & B), and put those objects in a 
single array (and sorting on a different key depending on how the 
user wanted the table sorted).

Hard to give more advice without knowing your specific problem.

Thanks,
Jon


On Aug 15, 2006, at 10:43 AM, Todd Freese wrote:

> I have two arrays that need to be sorted on the values of one of 
> the arrays. For example, sort Array B (which is an array of 
> NSNumbers) and rearrange Array A to keep the same item relationship 
> to Array B.
>
> Seems like a very common thing and I can't seem to find a call or a 
> doc ref to do so.
>
> Todd Freese
> The Filmworkers Club
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
>

Related mailsAuthorDate
mlMulti-Array Sorting Problem Todd Freese Aug 15, 19:43
mlRe: Multi-Array Sorting Problem Jon Hull Aug 15, 20:11
mlRe: Multi-Array Sorting Problem Matt Neuburg Aug 16, 19:01