You might consider changing how you store data just a little bit.
Instead of having two arrays, a single array with arrays as objects.
For example, you currently have:
Array 1 Array 2
- ---
| | | |
-
On Mon, Jul 28, 2008 at 9:17 PM, Graham Cox <[EMAIL PROTECTED]> wrote:
> Ah, OK, didn't quite grok that. If they are related, could object A have a
> reference to object B? If so, just sorting one array then gives you the
> other objects sorted in the same order without having to sort array B (or
>
Ah, OK, didn't quite grok that. If they are related, could object A
have a reference to object B? If so, just sorting one array then gives
you the other objects sorted in the same order without having to sort
array B (or even have one).
Graham
On 29 Jul 2008, at 11:08 am, Randall Meadows
On Jul 28, 2008, at 6:58 PM, Graham Cox wrote:
This has a bit of a whiff about it. Two arrays of the same objects
is not unusual, but forcing them always into the same order is -
surely that's just a data duplication? If the arrays are meant to be
identical, why not just use one array? What
Jeff,
This has a bit of a whiff about it. Two arrays of the same objects is
not unusual, but forcing them always into the same order is - surely
that's just a data duplication? If the arrays are meant to be
identical, why not just use one array? What is different?
If array B contains arra
The most logical is to make a class that has - as properties - the
two pieces of data being sorted, then put these in an NSArray (or
NSMutableArray as appropriate to your situation), and then sort that
instead. Not only will it sort both pieces of data together, but it's
a lot easier to e