On 9/22/09 11:00 PM, Graham Cox said:

>
>On 22/09/2009, at 10:40 PM, BareFeet wrote:
>
>>      NSLog(@"setDataRows: count == %@", [newDataRows count]);
>
>> Once I removed the NSLog line (or just the [newDataRows count]
>> method), it works fine.
>>
>> Two followup questions:
>>
>> 1. Why can't I use the array count in the NSlog like that?
>
>
>[<collection> count] returns an NSUInteger, not an object, so the %@
>format specifier is incorrect - you want %d. I expect that was causing
>some mangling.

%d is certainly less wrong than %@ but the most appropriate would be
%lu.  See:

<http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/
Strings/Articles/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265>

--
____________________________________________________________
Sean McBride, B. Eng                 [email protected]
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to