2011-06-17 68 views
0

從核心數據中提取數據後出現問題。我從獲取的數據填補了TableView中,但TableView中顯示了它從核心數據填充UITableViewCell時出現問題

以下數據(實體:財富; ID:0x6549c40;數據:)

誰能告訴我什麼,我做錯了什麼?下面是我用來填補TableViewCell

- (UITableViewCell *)tableView:(UITableView *)tableView 
    cellForRowAtIndexPath:(NSIndexPath *)indexPath { 


UITableViewCell *cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"] autorelease]; 

Fortune *info = [fetchedObjects objectAtIndex:indexPath.row]; 
    cell.textLabel.text = info.description; 


return cell; 

}

凡Fortnue是我的管理對象類和說明類的NSString的列中的代碼。

問候。

回答

2

[object description];是一種返回實例描述,內存地址等的默認方法。您不應該對NSManagedObject的任何屬性使用名稱'description'。

+0

好的我將描述更改爲fortuneName。現在它出現以下錯誤 用於打開商店的模型與用於創建商店的模型不兼容。 – Wasim 2011-06-17 12:49:54