• 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: Cannot D&D from an NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cannot D&D from an NSTableView


  • Subject: Re: Cannot D&D from an NSTableView
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 13 Nov 2011 20:45:58 -0800

On Nov 13, 2011, at 6:12 PM, Koen van der Drift wrote:

> I am setting up D&D from an NSTableView, but I cannot drag any items. I have added registerForDraggedTypes and - (BOOL)tableView:(NSTableView *)aTableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard  to my table view controller, and the controller is both the datasource and delegate for the table view. The latter method does not even get called.

Huh, that sounds like it should work. (Although -registerForDraggedTypes: doesn’t affect being able to drag out, only accepting incoming drags.) You’re sure this isn’t an NSOutlineView? It has different D&D data-source methods that get called instead of the inherited ones.

Does your table have any oddball cell types in its rows? IIRC if a row’s cell tracks the mouse-down itself (as a button cell would), you can’t use that event to start a drag.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: Cannot D&D from an NSTableView
      • From: Koen van der Drift <email@hidden>
References: 
 >Cannot D&D from an NSTableView (From: Koen van der Drift <email@hidden>)

  • Prev by Date: Cannot D&D from an NSTableView
  • Next by Date: Re: Cocoa-dev Digest, Vol 8, Issue 888
  • Previous by thread: Cannot D&D from an NSTableView
  • Next by thread: Re: Cannot D&D from an NSTableView
  • Index(es):
    • Date
    • Thread