Search code examples
objective-ccocoanstableviewnsarraycontroller

Deleting an object in NSArrayController


I have an NSTableView which gets its data from an NSArrayController and I need to delete the currently selected row. I know NSManagedObjectContext has a deleteObject: method but, I can't think of how to delete it from the NSArrayController.


Solution

  • Use the NSArrayController's remove: action.