Re: NSArray firstObject?
Re: NSArray firstObject?
- Subject: Re: NSArray firstObject?
- From: Gordon Apple <email@hidden>
- Date: Mon, 23 Dec 2013 10:02:47 -0500
- Thread-topic: NSArray firstObject?
That¹s also a problem with re-declared methods not labeled as IBAction, such
as a few contained in NSTextView. (e.g., superscript, subscript.)
Another point with firstObject. I assumed this was the same as array[0] or
objectAtIndex:0, but apparently not so. If I remember correctly, these
result in a range exception if the array is empty. FirstObject is a better
choice and avoids having to pre-check for count != 0.
On 12/22/13 3:00 PM, "email@hidden"
<email@hidden> wrote:
> So just declare it in a category and leave it out of the implementation? That
> of course gives me a warning that my implementation is incomplete.
> -(id)firstObject;
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden