Re: Detecting Failed TableView Drag?
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