• 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: Detecting Failed TableView Drag?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting Failed TableView Drag?


  • Subject: Re: Detecting Failed TableView Drag?
  • From: David Carlisle <email@hidden>
  • Date: Thu, 15 Feb 2007 08:50:27 -0700

I had skipped right to "Drag and Drop in Tables" "minimum required steps" without noticing the informal protocols, and I don't see them mentioned in the TableView docs.

But it is clear from the documentation that your subclassing approach will work.

Thanks.
DC

On Feb 15, 2007, at 7:52 AM, Michael Babin wrote:


On Feb 14, 2007, at 10:53 PM, email@hidden wrote:

When I start a TableView drag within the same table, I want to change the color of some entries in the table during the time of the drag. I want to change the color back when the drag is over with. If the drag is successful I can tell when the drag ends when the data source is asked to accept the drop. If the drag is not successful, how can I tell the drag has ended so I can reset the table colors?

Any thoughts?

According to <http://developer.apple.com/documentation/Cocoa/ Conceptual/TableView/Tasks/UsingDragAndDrop.html#//apple_ref/doc/ uid/20000726>:


"The NSTableView class implements both the NSDraggingSource and NSDraggingDestination informal protocols."

Given that one of the methods in the NSDraggingSource informal protocol is draggedImage:endedAt:operation:, I would try subclassing NSTableView and overriding this method with one that calls through to the overridden method of super and then does whatever processing you want to do at drag end.

I've never actually tried this technique myself and there may be a simpler method I'm overlooking, but it seems like it might fit your needs.

--
Michael Babin email@hidden
Order N Development, LLC http://www.orderndev.com/
Goldfish Aquarium for Mac: http://www.lifeglobe.com/product/ index.php?pltid=2&ref=OrderNDev



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >Detecting Failed TableView Drag? (From: email@hidden)
 >Re: Detecting Failed TableView Drag? (From: Michael Babin <email@hidden>)

  • Prev by Date: Technique for receiving specific keystrokes in Foundation
  • Next by Date: Re: Knowing if a scroll view is being scrolled
  • Previous by thread: Re: Detecting Failed TableView Drag?
  • Next by thread: Does movePath:toPath:handler correctly manage the handler return value?
  • Index(es):
    • Date
    • Thread