- (void)parserDidStartDocument:(NSXMLParser *)parser
{
nestedChannels = [ [ NSMutableArray alloc ] init ];
....
}
- (void)parser:(NSXMLParser *)parser didStartElement....
{
Channel *channel = [ [ Channel alloc ] init ];
[ nestedChannels addObject:channel ];
....
}
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string....
{
Channel *channel = [ nestedChannels lastObject ];
channel.thumbnail = string;
....
}
@interface Channel : NSObject {
NSMutableString *thumbnail;
}
@property (nonatomic, retain) NSMutableString *thumbnail;
Error: * Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘* -[NSCFString thumbnail]: unrecognized selector sent to instance 0x381c350′
It’s like is not able to recognize the type of the object. Am I missing something
**nestedChannels is a NSMutableArray*
Seems like this is causing the problem.
What type is thumbnail in channel and what mutators are available?
To me it looks like it is trying to set string to thumbnail but there’s no setter that accepts string on thumbnail. Is thumbnail
NSString?