• 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: exchangeObjectAtIndex (was NSMutableArray: where is addObjectIfAbsent:?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 18:05:25 -0700

On Wednesday, June 26, 2002, at 09:23 AM, Marco Scheurer wrote:
On Wednesday, June 26, 2002, at 05:13 pm, Shawn Erickson wrote:
On Wednesday, June 26, 2002, at 07:49 AM, Marco Scheurer wrote:

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?

In fact this is a bug in the doc. Looking at a class-dump of Foundation shows that this method is in NSMutableArray.

And using this method on an NSArray raises an exception.

Its in the Foundation framework header (NSArray.h) the wrong way as well.

-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.

References: 
 >Re: exchangeObjectAtIndex (was NSMutableArray: where is addObjectIfAbsent:?) (From: Marco Scheurer <email@hidden>)

  • Prev by Date: Re: class docs (was: Re: Mutable class problems)
  • Next by Date: Quartz/memory benchmarks...
  • Previous by thread: Re: exchangeObjectAtIndex (was NSMutableArray: where is addObjectIfAbsent:?)
  • Next by thread: Re: NSMutableArray: where is addObjectIfAbsent:?
  • Index(es):
    • Date
    • Thread