• 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: Okay to leave -concludeDragOperation: empty?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Okay to leave -concludeDragOperation: empty?


  • Subject: Re: Okay to leave -concludeDragOperation: empty?
  • From: matt neuburg <email@hidden>
  • Date: Tue, 27 Apr 2004 09:20:33 -0700

On Sun, 25 Apr 2004 17:10:13 +0100, Jeremy Dronfield
<email@hidden> said:
>I'm implementing drag-n-drop from a table view to a text view. The
>table contains a list of image files. The user can drag items out of
>the table view and drop them onto the text view, resulting in the image
>being inserted in the text. Images can also be dragged in from the
>Finder.
>
>So far so groovy. The issue is that I appear to have no use for the
>NSDraggingDestination method -concludeDragOperation:. I've implemented
>the method, because without it I was getting a "drag operation failed"
>error (even though the drag operation hadn't failed - this method is
>automatically called after -performDragOperation has returned YES). So
>I've got an empty implementation of -concludeDragOperation: in my text
>view subclass. My question, therefore, is: Am I missing something? I
>understand from the docs that -concludeDragOperation: is for tidying up
>the view after the drop, but I don't need this because tidying up is
>handled elsewhere.

I believe the problem is that text views are special. A text view already
implements drag and drop (that is, it can already receive a text drop), and
it relies on -concludeDragOperation; in fact, I think the real work of
inserting the text is done there. So unless you implement it (possibly
empty), you interfere with the text view's system receiving a drop. You
should probably conform to this: you should do the real work in
-concludeDragOperation if the work is yours to do, and call super otherwise.
m.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide! NOW SHIPPING...! (Finally.)
http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Is KVO really as complicated as I think?
  • Next by Date: Re: How to read hard disk sectors
  • Previous by thread: Okay to leave -concludeDragOperation: empty?
  • Next by thread: Re: Okay to leave -concludeDragOperation: empty?
  • Index(es):
    • Date
    • Thread