Hey guys,
I was wondering how it can be that iterating through an NSMutableArray works, but when I call objectAtIndex it fails with "*** -[NSCFSet objectAtIndex:]: unrecognized selector sent to instance 0x..."
Here is some sample code, the program is too big to share in whole so I hope it's enough. The code is executed in the latest iPhone Simulator from XCode.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
RDLogString(@"Creating cell @ row no. %d", indexPath.row);
CPPlayerAppDelegate * appDelegate = [[UIApplication sharedApplication] delegate];
RDLogString(@"Conversations: %p. Item count: %d", appDelegate.distribution.conversations, appDelegate.distribution.conversations.count);
//This works
for(CPConversation * x in appDelegate.distribution.conversations){
RDLogString(@"Pointer: %p with name %@", x, x.name);
}
//This fails with aforementioned error
CPConversation * conversationAtCurrentIndex = [appDelegate.distribution.conversations objectAtIndex: indexPath.row];
Sorry for the bad formatting, still figuring it out. :)
Thanks in advance, Nick