• 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
Dragging anything out of a WebView into other Cocoa controls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dragging anything out of a WebView into other Cocoa controls


  • Subject: Dragging anything out of a WebView into other Cocoa controls
  • From: Steven Degutis <email@hidden>
  • Date: Fri, 3 Apr 2009 20:48:43 -0500

Hello,
I have been trying to figure out some way of dragging an image, text, link,
anything really, out of a WebView, and into another Cocoa control, such as
NSTextField, NSTableView, or NSImageView. Dragging these things out of my
WebView and into other applications works fine, for example dragging links
or images onto Safari, and text into TextEdit. But dragging into a control
that is in the same application does not work.

I've created and tested a test-case project that shows the bare bones. In
this project, I simply dragged a WebView and TextField into IB, set the
WebView's URL to google.com, ran the app, and tried dragging some text out
of the WebView into the NSTextField, and it snaps back with no option of
Copy or other actions being available.

Ultimately what I'd like to do is drag elements out of the WebView and into
an NSOutlineView, and extract the represented data out of the element.
Looking through the documentation, I've stumbled upon this page:

http://developer.apple.com/DOCUMENTATION/AppleApplications/Conceptual/SafariJSProgTopics/Tasks/DragAndDrop.html

However, this seems to have nothing to do with dragging elements or items
out of the WebView and into other Cocoa controls, but only about dragging
them into other items in the WebView. It's possible that what I'm trying to
do is not possible, but I'm hoping this is not true.

Any help would not only be appreciated, but would be remembered for longer
than a day, and possibly thanked at an upcoming WWDC, maybe even more, who
knows.

~Steven Degutis
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: Dragging anything out of a WebView into other Cocoa controls
      • From: Steven Degutis <email@hidden>
  • Prev by Date: Re: IB Plugin help
  • Next by Date: Re: Error: mutating method sent to immutable object
  • Previous by thread: Re: Error: mutating method sent to immutable object
  • Next by thread: Re: Dragging anything out of a WebView into other Cocoa controls
  • Index(es):
    • Date
    • Thread