Removing table rows while editing?
Removing table rows while editing?
- Subject: Removing table rows while editing?
- From: David Feldman <email@hidden>
- Date: Thu, 07 Feb 2002 14:25:41 -0500
I'm having a problem with removing rows from an NSTableView's data source
while a cell in the table view is being edited.
I have a button that removes items from the table view (a single-column
list) by deleting them from the data source and reloading the table. But if
the cell is the last in the list, an exception is raised and all my lists
stop displaying properly. If the cell is in the middle of the list, the row
is removed and then the edited contents replace an adjacent row. This,
combined with the fact that the exception seems to happen when Cocoa is
trying to replace an item, leads me to believe that for some reason the
message to update the data source with the results of the edit happens
_after_ the table is reloaded from the row removal. How do I avoid this? I
presume the thing to do is cancel the edit before removing the row, forcing
an additional reload if necessary -- but I don't know how to do it.
Thanks,
--Dave
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.