• 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: NSTableView: which delegate after a drag operation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView: which delegate after a drag operation?


  • Subject: Re: NSTableView: which delegate after a drag operation?
  • From: Scott Anguish <email@hidden>
  • Date: Thu, 03 Mar 2011 23:47:53 -0500

On Mar 3, 2011, at 10:24 PM, Ulf Dunkel wrote:

> In a tiny document-based Cocoa app for Snow Leopard, I have a document window with two NSTableView objects, which get properly feeded by NSTableViewDataSource according to the documentation. Both table views show simple arrays of one column each.
>
> I can fill both table views with random content as I like to and even drag and drop inside a list, with perfect refresh of the relevant table view. But I would like to sync both table views somehow.
>
> Here are my two questions:
>
> 1) Which delegate can I use to inform table view B to update and reload its data when I have dragged an item inside table view A?
>
> The NSTableViewDelegate methods don't seem to really help me here; I tried them all.
>
> I could of course add any "Refresh" button or stuff, but I would like to refresh NSTableView B as soon as a row item of NSTableView A has been successfully dragged into a new position.

If you’re adding it to the object array, you can easily do the update notification then.

>
> 2) How can I prevent drag operations from table view A to table view B (and vice versa)? List members shall only be dragged inside their own list.

You can pass NSDragOperationNone if the target is the originating table.


_______________________________________________

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

  • Follow-Ups:
    • Re: NSTableView: which delegate after a drag operation?
      • From: Ulf Dunkel <email@hidden>
References: 
 >NSTableView: which delegate after a drag operation? (From: Ulf Dunkel <email@hidden>)

  • Prev by Date: Re: Adding subviews to UITableViewCell's contentView and autoresizing behavior
  • Next by Date: Re: Adding subviews to UITableViewCell's contentView and autoresizing behavior
  • Previous by thread: NSTableView: which delegate after a drag operation?
  • Next by thread: Re: NSTableView: which delegate after a drag operation?
  • Index(es):
    • Date
    • Thread