Re: NSArrray objectsAtIndexes:
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