2010-08-09 40 views
0

我已经在Objective-C中构建了一个XML解析器,并且消息objectForKey抛出了一个NSException但我不知道为什么。NSDictionary objectForKey抛出异常

aPicture = [[Picture alloc] init]; 

aPicture.pictureID = [[attributeDict objectForKey:@"id"] integerValue]; 

这里是例外的,我不明白的信息:

2010-08-09 21:27:32.223 rh[6375:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Picture setPictureID:]: unrecognized selector sent to instance 0x592e0b0' 

回答

-1

经过长时间的搜寻,我得到了我的错误...... 我已经福尔戈到synthezise的pictureID选择后。

....

+0

“长搜索”是“我发布我的问题后2分钟”? ;) – 2010-08-09 19:42:52

+0

是的,但我搜索半小时之前,我发布它^^ – Moritz 2010-08-09 20:31:31