I have an NSArrayController
hooked up to an NSManagedObjectContext
. Additionally, I have an NSTableView
whose Content and Selection Indexes are bound to said NSArrayController
.
Objects are constantly being added to the context in the background at a rate of 0.2 ~ 1.0 seconds per object. Making a single selection works fine, as is quickly selecting a handful of rows very quickly. However, if I'm in the middle of making a drag-select and an object gets added to the context, my selection indexes reset to their pre-mouse-down state.
How do I avoid this and ensure that, for the duration of my mouse-down, my selection is preserved despite new objects getting added to the context?