hey guys,
Here in my code, i add sections to a tableview from webservice. for every section, i have an item array whose values are also obtained from the webservice. now the problem is if i have 2 sections, the item array first loads the items to the first section, then on fetching the items of second section, it again loads the items to the first section.... I can detect that the pointer reference to both are same.
Code:
if (dataOption == kLoadItems) {
ItemSection *itemSection = [[IitemSection alloc] init];
if (itemSection != nil) {
itemSection = nil; [itemSection release];
}
itemSection = [itemController.itemSectionList objectAtIndex:_selectedSectionIndex];
itemSection.itemList = (NSMutableArray*)[data dataObject];
}
[_tableView reloadData];
the dataObject brings the items array from the webservice and it does contain valid data.
Kindly help me how i could load the items in the two sections...