Tableview refresh

I’m loading data from a sqlite db into my table. I’ve got it set up so I can double-click an item and it opens in a window that allows me to edit the data and resave back to my db. My problem arises here.

I want the table to refresh to show the updated data. I’ve used tableview’s reloadData() but it’s not refreshing the data.
I wrote a function that runs my sql call and reimports the data but it doesn’t remove the old data so everything is listed twice.

So I guess I’m looking for a way to clean the datasource so I can then reload it from scratch. What do I use to do this?

It sounds like the problem is with the function that reimports the data, and that it’s adding the data rather than replacing it.

I’m certain you’re right. I’m using addObjectFromArray but how do I clear my data source before I reload it so it doesn’t duplicate data?

What is your datasource?

NSMutableArray. But I just figured it out. Don’t know how I missed it in the docs but I did…

theDataSource's removeAllObjects()