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

NSTableView drag and drop too smart for its own good


  • Subject: NSTableView drag and drop too smart for its own good
  • From: Paul Kim <email@hidden>
  • Date: Wed, 13 Sep 2006 12:57:08 -0400

Hi,

I have two table views, one is a source list and the other is a detail (list of items for that source). Selecting an item in the source list reloads the data in the detail.

Now I want to be able to drag one detail item into the detail item for another source. I implemented a spring loaded folders type thing where if you hover the dragged detail item over a source, it switches to that source so you can drag the detail item back into the detail table (which now has different data than when the drag started). The reason for this is that ordering matters so this would give the user an opportunity to put it in the exact spot they want. Also note that they could just drop it on the source and it will add it to the end of the detail list.

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).

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?

Thanks,
Paul Kim



_______________________________________________
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: Jerry Krinock <email@hidden>
    • Re: NSTableView drag and drop too smart for its own good
      • From: Corbin Dunn <email@hidden>
  • Prev by Date: Re: NSGlyph from Unicode
  • Next by Date: Re: NSTextView/NSLayoutManager bug?
  • Previous by thread: Job Offer: Cocoa Client/Server/Graphics Software Engineer
  • Next by thread: Re: NSTableView drag and drop too smart for its own good
  • Index(es):
    • Date
    • Thread