• 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: NSArrray objectsAtIndexes:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrray objectsAtIndexes:


  • Subject: Re: NSArrray objectsAtIndexes:
  • From: Charilaos Skiadas <email@hidden>
  • Date: Thu, 28 Jul 2005 11:41:20 -0500

On Jul 28, 2005, at 11:24 AM, Pavel Kapinos wrote:

objectsAtIndexes:
- (NSArray *)objectsAtIndexes:(NSIndexSet *)indexes

Returns an array containing the objects in the receiver at the specified indexes. It is a programming error if any location in indexes exceeds the bounds of the receiver.

Availability
Available in Mac OS X version 10.4 and later.

Please clarify:

1) What type of exception it generates?

Just try it out and see :-)
Perhaps it will be the same exception as when using objectAtIndex: (NSRangeException)
2) Does it guarantee that returned objects are in the ascending order of their indexes, so that object in retuned array, which has higher index in indexes, will follow object, which has smaller index in indexes?

Again, just try it out :-)
The documentation for NSIndexSet does say though:
" The values in an index set are always sorted, so the order in which values are added is irrelevant."
so this might be some indicator, but I wouldn't consider it a guarantee.


Thank you!

Haris


_______________________________________________ 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: 
 >NSArrray objectsAtIndexes: (From: Pavel Kapinos <email@hidden>)

  • Prev by Date: Font error when building a Cocoa automator action
  • Next by Date: Re: Cocoa API Documentation
  • Previous by thread: NSArrray objectsAtIndexes:
  • Next by thread: Font error when building a Cocoa automator action
  • Index(es):
    • Date
    • Thread