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?


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.