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

Re: Dragging anything out of a WebView into other Cocoa controls


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

[Solved]
Apparently I was using the wrong data source method to validate drops, which
explains why this was not working with my NSOutlineView. Thanks for all the
fish.

- Anonymous

On Fri, Apr 3, 2009 at 8:48 PM, Steven Degutis <email@hidden>wrote:

> 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
>



--
~Steven Degutis
President, Thoughtful Tree Software, Inc.
http://www.ThoughtfulTree.com/
http://www.TeachMeCocoa.com/
_______________________________________________

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

References: 
 >Dragging anything out of a WebView into other Cocoa controls (From: Steven Degutis <email@hidden>)

  • Prev by Date: Re: NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey"
  • Next by Date: Re: How to animate the drawing of UIImages inside a drawRect: method of a UIView?
  • Previous by thread: Dragging anything out of a WebView into other Cocoa controls
  • Next by thread: Very interesting ordering caveat with NSArray arrayWithObjects:
  • Index(es):
    • Date
    • Thread