• 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: Michael Babin <email@hidden>
  • Date: Thu, 15 Feb 2007 08:52:58 -0600


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


  • Follow-Ups:
    • Re: Detecting Failed TableView Drag?
      • From: David Carlisle <email@hidden>
References: 
 >Detecting Failed TableView Drag? (From: email@hidden)

  • Prev by Date: Re: Frustration trying to get NSConnection/NSPort working (feels like it should be simpler ...)
  • Next by Date: Re: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context?
  • Previous by thread: Detecting Failed TableView Drag?
  • Next by thread: Re: Detecting Failed TableView Drag?
  • Index(es):
    • Date
    • Thread