Re: Question on NSTableViewDataSource Protocol
Re: Question on NSTableViewDataSource Protocol
- Subject: Re: Question on NSTableViewDataSource Protocol
- From: Jerry Krinock <email@hidden>
- Date: Thu, 15 May 2014 22:44:31 -0700
On 2014 May 15, at 18:18, Varun Chandramohan <email@hidden> wrote:
> This is bad idea as I am doing this inside " performInsertWithDragInfo" before I return from tableView:(NSTableView *)tableView acceptDrop:(id<NSDraggingInfo>)info row:(NSInteger)row dropOperation:(NSTableViewDropOperation)dropOperation which looks wrong to me.
I don’t see anything wrong with that.
> Am I missing something?
Well, whenever you have code that does not work in earlier systems, there’s a good chance that you’re dealing with a bug in the system. However, this line of code in your data source method that adds a row…
> [_tableContents removeAllObjects];
followed by, it looks like, repopulating _tableContents from scratch looks to me like a brute force, problematic and definitely non-standard way of adding a row to a table / object to a data model. Avoid touching the existing objects. That might help with the assertion issue.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden