Re: NSMutableArray count causes EXC_BAD_ACCESS
Re: NSMutableArray count causes EXC_BAD_ACCESS
- Subject: Re: NSMutableArray count causes EXC_BAD_ACCESS
- From: "Sean McBride" <email@hidden>
- Date: Mon, 16 Aug 2010 12:37:16 -0400
- Organization: Rogue Research Inc.
On Mon, 16 Aug 2010 02:08:25 +0200, Christiaan Hofman said:
>> On Mon, Aug 16, 2010 at 9:00 AM, Mark Woollard <email@hidden> wrote:
>> [members count] returns an integer, not a class instance, so you need
>to use:
>>
>> NSLog(@"Count: %d",[members count]);
>>
>> Actually, -[NSArray count] returns an NSUInteger, so you should really use:
>>
>> NSLog (@"Count: %lu", (long)[members count]);
>>
>
>In fact that should be
>
> NSLog(@"Count: %lu", (unsigned long)[members count]);
Yes, that is what Apple's docs recommend:
<http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/
Strings/Articles/formatSpecifiers.html>
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden