• 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 drag and drop too smart for its own good
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView drag and drop too smart for its own good


  • Subject: Re: NSTableView drag and drop too smart for its own good
  • From: Corbin Dunn <email@hidden>
  • Date: Wed, 13 Sep 2006 12:49:16 -0700


The problem is that it seems like NSTableView sees itself as the source of the drag, so it won't allow drops at the position of the original dragged row (thinking it's just a move of a row within itself). It doesn't even seem to call -tableView: validateDrop: proposedRow: proposedDropOperation: on my data source when the drag is over the original row position (even though in my case, the table has different data so it would make sense to drop it there).



This is a bug which will be fixed.

Is there an easy way to work around this or am I stuck re- implementing NSTableView's drag and drop in a subclass to get this to work?

An easy, cool, workaround: use two tableviews (they can have the same datasource/delegate). When switching sources, use NSViewAnimation to fade one table out and the other table in. Cool! (and avoids your issue). For abstraction, you can keep a pointer to the "active tableview" or something like that and switch back and forth.


-corbin
_______________________________________________
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: NSTableView drag and drop too smart for its own good
      • From: Paul Kim <email@hidden>
References: 
 >NSTableView drag and drop too smart for its own good (From: Paul Kim <email@hidden>)

  • Prev by Date: Core Data and Search / Filter Fields
  • Next by Date: Re: NSTableView drag and drop too smart for its own good
  • Previous by thread: NSTableView drag and drop too smart for its own good
  • Next by thread: Re: NSTableView drag and drop too smart for its own good
  • Index(es):
    • Date
    • Thread