I have a table with two custom cells that crash when try to dequeue.
Here is the code :
int row = indexPath.row;
static NSString *CellIdentifier;
UITableViewCell* cell;
PoetCell * poetCell;
PoemsCell * poemsCell;
if(row == 0) {
    CellIdentifier = @"PoetCell";
} else {
    CellIdentifier = @"poemsCell";        
}
if(row == 0) {
    poetCell= [aTableView dequeueReusableCellWithIdentifier:CellIdentifier];
    poetCell.image.image=[UIImage imageWithData:imageData];
    if([imageData length]==0){
        poetCell.image.hidden=TRUE;
        poetCell.Name.frame=CGRectMake(124, poetCell.Name.frame.origin.y, poetCell.Name.frame.size.width, poetCell.Name.frame.size.height);
    } else {
        poetCell.Name.frame=CGRectMake(38, poetCell.Name.frame.origin.y, poetCell.Name.frame.size.width, poetCell.Name.frame.size.height);
    }
    poetCell.desc.text=pdesc;
    poetCell.Name.text=pName;
} else {
        poemsCell= [aTableView dequeueReusableCellWithIdentifier:CellIdentifier];
        if([poemsNames count]) {
            poemsCell.poemText.text=[poemsNames objectAtIndex:row-1];
        }
}
It gives error on the line :
poetCell= [aTableView dequeueReusableCellWithIdentifier:CellIdentifier];
which say
[UITableViewCell setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Name.
I know this error comes when there's a bad link in the nib.. But that's not the case I believe it is in the code.. So can any one get what the problem is ?
EDITed
i think the whole problem is with the initializing of poetCell and poemsCell which is that's the code
#import <UIKit/UIKit.h>
@interface PoetCell : UITableViewCell
{
    IBOutlet UILabel*Name;
    IBOutlet UILabel*desc;
    IBOutlet UIImageView*image;
}
@property(nonatomic,retain)IBOutlet UILabel*Name;
@property(nonatomic,retain)IBOutlet UILabel*desc;
@property(nonatomic,retain)IBOutlet UIImageView*image;
@end
#import "PoetCell.h"
@implementation PoetCell
@synthesize Name,desc,image;
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}
the other cell is just the same
 
     
     
     
    