NSDictionary turns into NSCFArray

adamfenn28's picture

I have a collection of patches that read XML data feeds, and produce an NSArray (structure) of NSDictionaries. When I connect the output from that patch to the input of another patch that uses that structure, I see the structure perfectly when I over over the input port of the second patch. I see an indexed structure of keyed structures. In my second patch, I use this code to test the object type (because I was having problems).

      NSLog(@"%@", NSStringFromClass([[structure objectAtIndex:i] class]));

I would expect to see NSDictionary in my log, but I get NSCFArray. This doesn't make any sense to me. I used to hand off a structure that was a NSDictionary of NSDictionaries, rather than an NSArray of NSDictionaries, and that worked fine. This problem only cropped up recently when I switched to NSArray, so that I can keep my ordering perfectly.

What could this problem be?

Thanks!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cwright's picture
Re: NSDictionary turns into NSCFArray

This is a known bug and limitation of the API.

http://lists.apple.com/archives/quartzcomposer-dev/2010/Jun/msg00094.html

adamfenn28's picture
Re: NSDictionary turns into NSCFArray

Thanks @cwright! Bummer though. It looks like I need to back my code out so that I'm using dictionaries of dictionaries again.