Re: sorting a pair of arrays
Re: sorting a pair of arrays
- Subject: Re: sorting a pair of arrays
- From: Gregory Weston <email@hidden>
- Date: Tue, 28 Jun 2011 12:40:56 -0400
Mikkel Islay wrote:
> It sounds to me like one way of looking at your data structures is as a NSDictionary with the first array as keys and the second as objects (values).
Which fails the if there's any possibility that the items in the first array aren't unique. Better two have an array of dictionaries where each dictionary holds a respective pair from the current two arrays as their own objects
{
myInt -> 1
myString -> "some string"
}
Then a typical use of either sort descriptors or a comparison proc.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden