Reasons this could be happening:

1) The exception is actually in a completely different place
2) _arrayController does not point to what you think it does. Could perhaps be 
a freed object since replaced with something else that returns a data object 
for -arrangedObjects
3) The array controller is a custom subclass that is somehow returning a data 
object from its -arrangedObjects method.

I'm thinking 1) is most likely. By calling it an "error" suggests you don't 
fully understand what is going on. This is an exception. Have you used the 
debugger to step through the code and test? Sounds not to me.

On 6 Dec 2009, at 00:23, PCWiz wrote:

> I'm having an *extremely* strange problem here. I'm using this simple if 
> statement to find out if an array controller is not empty:
> 
> if ([[_arrayController arrangedObjects] count] > 0)
> 
> And this is what it results in:
> 
> -[NSCFData count]: unrecognized selector sent to instance 0x134d010
> 
> If I take out that if statement and let the code run without a check to see 
> if the array controller is empty, that error does not appear so I'm fairly 
> certain that this is what's causing the issue. I've also gone through the 
> rest of my code checking for any typos which might try to use the count 
> method on an NSData object, but I found nothing.
> 
> Really confused here because I've used that same if statement many times 
> before, so I don't see why its messing up 
> now._______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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/cocoadev%40mikeabdullah.net
> 
> This email sent to cocoa...@mikeabdullah.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to