• 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: Multi-Array Sorting Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi-Array Sorting Problem


  • Subject: Re: Multi-Array Sorting Problem
  • From: Jon Hull <email@hidden>
  • Date: Tue, 15 Aug 2006 11:11:43 -0700

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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to 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
References: 
 >Multi-Array Sorting Problem (From: Todd Freese <email@hidden>)

  • Prev by Date: Multi-Array Sorting Problem
  • Next by Date: Inserting a fault in CoreData?
  • Previous by thread: Multi-Array Sorting Problem
  • Next by thread: Re: Multi-Array Sorting Problem
  • Index(es):
    • Date
    • Thread