• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Question on NSTableViewDataSource Protocol
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Question on NSTableViewDataSource Protocol (From: Varun Chandramohan <email@hidden>)

  • Prev by Date: Re: where to put persistent storage for command-line app
  • Next by Date: Re: where to put persistent storage for command-line app
  • Previous by thread: Question on NSTableViewDataSource Protocol
  • Next by thread: Re: Question on NSTableViewDataSource Protocol
  • Index(es):
    • Date
    • Thread