Re: NSArrayController addObject or insertObject:atArrangedObjectIndex:
Re: NSArrayController addObject or insertObject:atArrangedObjectIndex:
- Subject: Re: NSArrayController addObject or insertObject:atArrangedObjectIndex:
- From: "Sean McBride" <email@hidden>
- Date: Tue, 22 Sep 2009 11:50:25 -0400
- Organization: Rogue Research Inc.
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@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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