Re: exchangeObjectAtIndex (was NSMutableArray: where is addObjectIfAbsent:?)
Re: exchangeObjectAtIndex (was NSMutableArray: where is addObjectIfAbsent:?)
- Subject: Re: exchangeObjectAtIndex (was NSMutableArray: where is addObjectIfAbsent:?)
- From: Shawn Erickson <email@hidden>
- Date: Wed, 26 Jun 2002 08:13:43 -0700
On Wednesday, June 26, 2002, at 07:49 AM, Marco Scheurer wrote:
On Wednesday, June 26, 2002, at 06:22 am, Laurent Daudelin wrote:
OK, I'm maybe late on this one, but why didn't this method make OS X? I
remember pretty well that it was in NeXTSTEP/OPENSTEP. That forces me
to add
an additional test and a an additional line of code...
Any reason I can't see?
And can someone explain to me what
- (void)exchangeObjectAtIndex:(unsigned)idx1
withObjectAtIndex:(unsigned)idx2
is doing in NSArray instead of NSMutableArray ?
Humm... it is part of the NSExtendedArray category when it most likely
should be part of the NSExtendedMutableArray category.
You have me stumped. Have you trying calling it to see if it actually
modifies an NSArray?
It looks like it may have leaked up on the wrong side of the fence from
CoreFoundation's CFArray.
/*!
@function CFArrayExchangeValuesAtIndices
Exchanges the values at two indices of the array.
@param theArray The array of which the values are to be swapped. If
this parameter is not a valid mutable CFArray, the behavior
is undefined.
@param idx1 The first index whose values should be swapped. If the
index is outside the index space of the array (0 to N-1
inclusive, where N is the count of the array before the
operation), the behavior is undefined.
@param idx2 The second index whose values should be swapped. If the
index is outside the index space of the array (0 to N-1
inclusive, where N is the count of the array before the
operation), the behavior is undefined.
*/
CF_EXPORT
void CFArrayExchangeValuesAtIndices(CFMutableArrayRef theArray, CFIndex
idx1, CFIndex idx2);
-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.