I am having a class called Customer.
Customer *object; //in this object i have the following data varialbles.
object.customerName
object.customerAddress
object.customerContactList
I declared customerContactList as NSMutableArray and also allocated and initialized.
Now I am adding or deleting from contactList.
//Adding.
[object.customerContactList addObject:editcontacts];// here editcontacts one of the object in contactList.
//Deleting.
[object.customerContactList removeObjectAtIndex:indexPath.row];
[theTableView deleteSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationFade];
I am getting exception even it is NSMutableArray. Please help me.
Thank You,
Madan Mohan
I’m jut guessing, because as Williham Totland said, we need to see your code. How is the customerContactList property declared, implemented and assigned?
My guess is that somewhere you are using
copyon the array. If you sendcopyto anNSMutalbeArrayyou’ll get an immutable copy back. If your property is declared:you’ll get an immutable array back when you use it. You might even get an immutable array if you declare it thus (I’m not sure how clever the compiler is):