• 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
validateDrop in NSTableView never called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

validateDrop in NSTableView never called


  • Subject: validateDrop in NSTableView never called
  • From: Tristan Jehan <email@hidden>
  • Date: Sat, 8 Apr 2006 15:39:35 -0400

I've been struggling with drag-and-drop in an NSTableView for a while now.

I have an NSTableView setup like in the "Bookmarks" example. The data source and delegate of it is a subclass of an NSArrayController where is implemented at least the three methods: tableView:writeRowsWithIndexes:toPasteboard:, tableView:validateDrop:proposedRow:proposedDropOperation:, and tableView: acceptDrop:row:dropOperation:

I register the drag-and-drop in the awakeFromNib function of that NSArrayController with: [tableView registerForDraggedTypes: [NSArray arrayWithObjects: CopiedRowsType, MovedRowsType, nil]]; and that gets passed just fine.

At runtime, tableView:writeRowsWithIndexes:toPasteboard: gets called and returns YES. However tableView:validateDrop:proposedRow:proposedDropOperation: and tableView: acceptDrop:row:dropOperation: never get called and the dragged row goes back to its initial location. What am I possibly doing wrong? Thanks.

Tristan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: validateDrop in NSTableView never called
      • From: August Trometer <email@hidden>
  • Prev by Date: Re: Cocoa bindings performance
  • Next by Date: Re: validateDrop in NSTableView never called
  • Previous by thread: Re: Problem with displaying drawer in doc-based app
  • Next by thread: Re: validateDrop in NSTableView never called
  • Index(es):
    • Date
    • Thread