I think I'm missing something very simple here. The cell's text is being set to the same thing for each cell right now. Can anyone see my error?
for (ProductItem *code in codeAray1)
{
NSString *codeText = code.code;
NSString *nameText = code.name;
NSString *cellText = [NSString stringWithFormat:@"%@: %@", codeText, nameText];
cell.textLabel.text = cellText;
}
And this is how the array is created from SQLite query:
ProductItem *code = [[HCPCSCodes alloc] init];
code.code = [NSString stringWithCString:(char *)sqlite3_column_text(statement, 0) encoding:NSUTF8StringEncoding];
code.name = [NSString stringWithCString:(char *)sqlite3_column_text(statement, 1) encoding:NSUTF8StringEncoding];
code.description = [NSString stringWithCString:(char *)sqlite3_column_text(statement, 2) encoding:NSUTF8StringEncoding];
[codeAray1 addObject:code];
[code release];
}